getAllFromGroup static method
Will get a PcoCollection
containing ALL PcoGroupsEvent objects (expecting many)
using a path like this: /groups/v2/groups/$groupId/events
Available Query Filters:
canceled
not_canceled
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<PcoGroupsEvent>> getAllFromGroup(
String groupId, {
String? id,
PcoGroupsEventQuery? query,
bool includeAllRelated = false,
bool includeGroup = false,
bool includeLocation = false,
}) async {
query ??= PcoGroupsEventQuery();
query.getAll = true;
if (includeAllRelated) query.include.addAll(PcoGroupsEvent.canInclude);
if (includeGroup) query.include.add('group');
if (includeLocation) query.include.add('location');
var url = '/groups/v2/groups/$groupId/events';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoGroupsEvent>(url,
query: query, apiVersion: kApiVersion);
}