getAllFromGroup static method
Future<PcoCollection<PcoGroupsResource> >
getAllFromGroup(
- String groupId, {
- String? id,
- PcoGroupsResourceQuery? query,
Will get a PcoCollection
containing ALL PcoGroupsResource objects (expecting many)
using a path like this: /groups/v2/groups/$groupId/resources
Available Query Filters:
leaders
filter resources only visible to group leaders
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<PcoGroupsResource>> getAllFromGroup(
String groupId, {
String? id,
PcoGroupsResourceQuery? query,
}) async {
query ??= PcoGroupsResourceQuery();
query.getAll = true;
var url = '/groups/v2/groups/$groupId/resources';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoGroupsResource>(url,
query: query, apiVersion: kApiVersion);
}