getAllFromLabel static method
Will get a PcoCollection
containing ALL PcoCheckInsEventLabel objects (expecting many)
using a path like this: /check-ins/v2/labels/$labelId/event_labels
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.
This function forces the query.getAll
to be true.
Implementation
static Future<PcoCollection<PcoCheckInsEventLabel>> getAllFromLabel(
String labelId, {
String? id,
PcoCheckInsEventLabelQuery? query,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeLabel = false,
}) async {
query ??= PcoCheckInsEventLabelQuery();
query.getAll = true;
if (includeAllRelated)
query.include.addAll(PcoCheckInsEventLabel.canInclude);
if (includeEvent) query.include.add('event');
if (includeLabel) query.include.add('label');
var url = '/check-ins/v2/labels/$labelId/event_labels';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoCheckInsEventLabel>(url,
query: query, apiVersion: kApiVersion);
}