getSingle static method

Future<PcoGroupsTagGroup?> getSingle(
  1. String id, {
  2. PcoGroupsTagGroupQuery? query,
})

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

Available Query Filters:

  • public Filter tag groups that are visible on public pages

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

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