getAll static method

Future<PcoCollection<PcoPeopleNoteCategory>> getAll({
  1. String? id,
  2. PcoPeopleNoteCategoryQuery? query,
  3. bool includeAllRelated = false,
  4. bool includeShares = false,
  5. bool includeSubscribers = false,
  6. bool includeSubscriptions = false,
})

Will get a PcoCollection containing ALL PcoPeopleNoteCategory objects (expecting many) using a path like this: /people/v2/note_categories

Available Query Filters:

  • view_creatable

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.

This function forces the query.getAll to be true.

Implementation

static Future<PcoCollection<PcoPeopleNoteCategory>> getAll({
  String? id,
  PcoPeopleNoteCategoryQuery? query,
  bool includeAllRelated = false,
  bool includeShares = false,
  bool includeSubscribers = false,
  bool includeSubscriptions = false,
}) async {
  query ??= PcoPeopleNoteCategoryQuery();
  query.getAll = true;
  if (includeAllRelated)
    query.include.addAll(PcoPeopleNoteCategory.canInclude);
  if (includeShares) query.include.add('shares');
  if (includeSubscribers) query.include.add('subscribers');
  if (includeSubscriptions) query.include.add('subscriptions');
  var url = '/people/v2/note_categories';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoPeopleNoteCategory>(url,
      query: query, apiVersion: kApiVersion);
}