getAllFromEvent static method
Will get a PcoCollection
containing ALL PcoCheckInsEventPeriod objects (expecting many)
using a path like this: /check-ins/v2/events/$eventId/event_periods
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<PcoCheckInsEventPeriod>> getAllFromEvent(
String eventId, {
String? id,
PcoCheckInsEventPeriodQuery? query,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeEventTimes = false,
}) async {
query ??= PcoCheckInsEventPeriodQuery();
query.getAll = true;
if (includeAllRelated)
query.include.addAll(PcoCheckInsEventPeriod.canInclude);
if (includeEvent) query.include.add('event');
if (includeEventTimes) query.include.add('event_times');
var url = '/check-ins/v2/events/$eventId/event_periods';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoCheckInsEventPeriod>(url,
query: query, apiVersion: kApiVersion);
}