getSingleFromGroupType static method
Future<PcoGroupsResource?>
getSingleFromGroupType(
- String groupTypeId,
- String id, {
- PcoGroupsResourceQuery? query,
Will get a single PcoGroupsResource
object
using a path like this: /groups/v2/group_types/$groupTypeId/resources/[id]
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<PcoGroupsResource?> getSingleFromGroupType(
String groupTypeId,
String id, {
PcoGroupsResourceQuery? query,
}) async {
query ??= PcoGroupsResourceQuery();
var url = '/groups/v2/group_types/$groupTypeId/resources/$id';
var retval = await PcoCollection.fromApiCall<PcoGroupsResource>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}