getFromEventInstance static method
Future<PcoCollection<PcoCalendarEventTime> >
getFromEventInstance(
- String eventInstanceId, {
- String? id,
- PcoCalendarEventTimeQuery? query,
- bool getAll = false,
- bool includeEvent = false,
Will get a PcoCollection
of PcoCalendarEventTime objects (expecting many)
using a path like this: /calendar/v2/event_instances/$eventInstanceId/event_times
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<PcoCalendarEventTime>> getFromEventInstance(
String eventInstanceId, {
String? id,
PcoCalendarEventTimeQuery? query,
bool getAll = false,
bool includeEvent = false,
}) async {
query ??= PcoCalendarEventTimeQuery();
if (getAll) 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);
}