get static method

Future<PcoCollection<PcoCalendarTagGroup>> get({
  1. String? id,
  2. PcoCalendarTagGroupQuery? query,
  3. bool getAll = false,
  4. bool includeAllRelated = false,
  5. bool includeEvents = false,
  6. bool includeTags = false,
})

Will get a PcoCollection of PcoCalendarTagGroup objects (expecting many) using a path like this: /calendar/v2/tag_groups

Available Query Filters:

  • required

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<PcoCalendarTagGroup>> get({
  String? id,
  PcoCalendarTagGroupQuery? query,
  bool getAll = false,
  bool includeAllRelated = false,
  bool includeEvents = false,
  bool includeTags = false,
}) async {
  query ??= PcoCalendarTagGroupQuery();
  if (getAll) query.getAll = true;
  if (includeAllRelated) query.include.addAll(PcoCalendarTagGroup.canInclude);
  if (includeEvents) query.include.add('events');
  if (includeTags) query.include.add('tags');
  var url = '/calendar/v2/tag_groups';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCalendarTagGroup>(url,
      query: query, apiVersion: kApiVersion);
}