get static method
Will get a PcoCollection
of PcoPeopleReport objects (expecting many)
using a path like this: /people/v2/reports
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<PcoPeopleReport>> get({
String? id,
PcoPeopleReportQuery? query,
bool getAll = false,
bool includeAllRelated = false,
bool includeCreatedBy = false,
bool includeUpdatedBy = false,
}) async {
query ??= PcoPeopleReportQuery();
if (getAll) query.getAll = true;
if (includeAllRelated) query.include.addAll(PcoPeopleReport.canInclude);
if (includeCreatedBy) query.include.add('created_by');
if (includeUpdatedBy) query.include.add('updated_by');
var url = '/people/v2/reports';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoPeopleReport>(url,
query: query, apiVersion: kApiVersion);
}