get static method

Future<PcoCollection<PcoPeopleTab>> get({
  1. String? id,
  2. PcoPeopleTabQuery? query,
  3. bool getAll = false,
  4. bool includeAllRelated = false,
  5. bool includeFieldDefinitions = false,
  6. bool includeFieldOptions = false,
})

Will get a PcoCollection of PcoPeopleTab objects (expecting many) using a path like this: /people/v2/tabs

Available Query Filters:

  • with_field_definitions

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<PcoPeopleTab>> get({
  String? id,
  PcoPeopleTabQuery? query,
  bool getAll = false,
  bool includeAllRelated = false,
  bool includeFieldDefinitions = false,
  bool includeFieldOptions = false,
}) async {
  query ??= PcoPeopleTabQuery();
  if (getAll) query.getAll = true;
  if (includeAllRelated) query.include.addAll(PcoPeopleTab.canInclude);
  if (includeFieldDefinitions) query.include.add('field_definitions');
  if (includeFieldOptions) query.include.add('field_options');
  var url = '/people/v2/tabs';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoPeopleTab>(url,
      query: query, apiVersion: kApiVersion);
}