getAll static method
Will get a PcoCollection
containing ALL PcoPeopleList objects (expecting many)
using a path like this: /people/v2/lists
Available Query Filters:
can_manage
recently_viewed
starred
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<PcoPeopleList>> getAll({
String? id,
PcoPeopleListQuery? query,
bool includeAllRelated = false,
bool includeCampus = false,
bool includeCategory = false,
bool includeCreatedBy = false,
bool includeMailchimpSyncStatus = false,
bool includePeople = false,
bool includeRules = false,
bool includeShares = false,
bool includeUpdatedBy = false,
}) async {
query ??= PcoPeopleListQuery();
query.getAll = true;
if (includeAllRelated) query.include.addAll(PcoPeopleList.canInclude);
if (includeCampus) query.include.add('campus');
if (includeCategory) query.include.add('category');
if (includeCreatedBy) query.include.add('created_by');
if (includeMailchimpSyncStatus) query.include.add('mailchimp_sync_status');
if (includePeople) query.include.add('people');
if (includeRules) query.include.add('rules');
if (includeShares) query.include.add('shares');
if (includeUpdatedBy) query.include.add('updated_by');
var url = '/people/v2/lists';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoPeopleList>(url,
query: query, apiVersion: kApiVersion);
}