getFromEvent static method
Will get a PcoCollection
of PcoCheckInsLocation objects (expecting many)
using a path like this: /check-ins/v2/events/$eventId/locations
Available Query Filters:
locations
root
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<PcoCheckInsLocation>> getFromEvent(
String eventId, {
String? id,
PcoCheckInsLocationQuery? query,
bool getAll = false,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeLocations = false,
bool includeOptions = false,
bool includeParent = false,
}) async {
query ??= PcoCheckInsLocationQuery();
if (getAll) query.getAll = true;
if (includeAllRelated) query.include.addAll(PcoCheckInsLocation.canInclude);
if (includeEvent) query.include.add('event');
if (includeLocations) query.include.add('locations');
if (includeOptions) query.include.add('options');
if (includeParent) query.include.add('parent');
var url = '/check-ins/v2/events/$eventId/locations';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoCheckInsLocation>(url,
query: query, apiVersion: kApiVersion);
}