getDownloadFromGroupTypeAndResource static method
Future<PcoCollection<PcoGroupsResource> >
getDownloadFromGroupTypeAndResource(
- String groupTypeId,
- String resourceId, {
- PcoGroupsResourceQuery? query,
- bool getAll = false,
Will get a PcoCollection
of PcoGroupsResource objects (expecting one)
using a path like this: /groups/v2/group_types/$groupTypeId/resources/$resourceId/download
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<PcoGroupsResource>>
getDownloadFromGroupTypeAndResource(
String groupTypeId,
String resourceId, {
PcoGroupsResourceQuery? query,
bool getAll = false,
}) async {
query ??= PcoGroupsResourceQuery();
if (getAll) query.getAll = true;
var url =
'/groups/v2/group_types/$groupTypeId/resources/$resourceId/download';
return PcoCollection.fromApiCall<PcoGroupsResource>(url,
query: query, apiVersion: kApiVersion);
}