getSingleFromEvent static method
Will get a single PcoCheckInsEventPeriod
object
using a path like this: /check-ins/v2/events/$eventId/event_periods/[id]
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<PcoCheckInsEventPeriod?> getSingleFromEvent(
String eventId,
String id, {
PcoCheckInsEventPeriodQuery? query,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeEventTimes = false,
}) async {
query ??= PcoCheckInsEventPeriodQuery();
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/$id';
var retval = await PcoCollection.fromApiCall<PcoCheckInsEventPeriod>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}