get static method
Will get a PcoCollection
of PcoPeopleNoteCategory objects (expecting many)
using a path like this: /people/v2/note_categories
Available Query Filters:
view_creatable
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<PcoPeopleNoteCategory>> get({
String? id,
PcoPeopleNoteCategoryQuery? query,
bool getAll = false,
bool includeAllRelated = false,
bool includeShares = false,
bool includeSubscribers = false,
bool includeSubscriptions = false,
}) async {
query ??= PcoPeopleNoteCategoryQuery();
if (getAll) 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);
}