getSingle static method

Will get a single PcoGroupsGroupType object using a path like this: /groups/v2/group_types/[id]

Available Query Filters:

  • church_center_visible
  • not_church_center_visible

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<PcoGroupsGroupType?> getSingle(
  String id, {
  PcoGroupsGroupTypeQuery? query,
}) async {
  query ??= PcoGroupsGroupTypeQuery();

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