getFromEventAndEventLabel static method

Future<PcoCollection<PcoCheckInsLabel>> getFromEventAndEventLabel(
  1. String eventId,
  2. String eventLabelId, {
  3. String? id,
  4. PcoCheckInsLabelQuery? query,
  5. bool getAll = false,
})

Will get a PcoCollection of PcoCheckInsLabel objects (expecting many) using a path like this: /check-ins/v2/events/$eventId/event_labels/$eventLabelId/label

Getting a PcoCollection is useful even when retrieving a single object because it contains error data and helper functions.

Additional options may be specified by using the query argument, but some query options are also available as boolean flags in this function call too.

Implementation

static Future<PcoCollection<PcoCheckInsLabel>> getFromEventAndEventLabel(
  String eventId,
  String eventLabelId, {
  String? id,
  PcoCheckInsLabelQuery? query,
  bool getAll = false,
}) async {
  query ??= PcoCheckInsLabelQuery();
  if (getAll) query.getAll = true;

  var url = '/check-ins/v2/events/$eventId/event_labels/$eventLabelId/label';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsLabel>(url,
      query: query, apiVersion: kApiVersion);
}