getSingleFromGroup static method

Future<PcoGroupsGroupType?> getSingleFromGroup(
  1. String groupId,
  2. String id, {
  3. PcoGroupsGroupTypeQuery? query,

Will get a single PcoGroupsGroupType object using a path like this: /groups/v2/groups/$groupId/group_type/[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.


static Future<PcoGroupsGroupType?> getSingleFromGroup(
  String groupId,
  String id, {
  PcoGroupsGroupTypeQuery? query,
}) async {
  query ??= PcoGroupsGroupTypeQuery();

  var url = '/groups/v2/groups/$groupId/group_type/$id';
  var retval = await PcoCollection.fromApiCall<PcoGroupsGroupType>(url,
      query: query, apiVersion: kApiVersion);
  return retval.items.isEmpty ? null : retval.items.first;