getAllFromEventInstance static method

Future<PcoCollection<PcoCalendarEventTime>> getAllFromEventInstance(
  1. String eventInstanceId, {
  2. String? id,
  3. PcoCalendarEventTimeQuery? query,
  4. bool includeEvent = false,
})

Will get a PcoCollection containing ALL PcoCalendarEventTime objects (expecting many) using a path like this: /calendar/v2/event_instances/$eventInstanceId/event_times

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<PcoCalendarEventTime>> getAllFromEventInstance(
  String eventInstanceId, {
  String? id,
  PcoCalendarEventTimeQuery? query,
  bool includeEvent = false,
}) async {
  query ??= PcoCalendarEventTimeQuery();
  query.getAll = true;

  if (includeEvent) query.include.add('event');
  var url = '/calendar/v2/event_instances/$eventInstanceId/event_times';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCalendarEventTime>(url,
      query: query, apiVersion: kApiVersion);
}