getAll static method

Future<PcoCollection<PcoPeopleReport>> getAll({
  1. String? id,
  2. PcoPeopleReportQuery? query,
  3. bool includeAllRelated = false,
  4. bool includeCreatedBy = false,
  5. bool includeUpdatedBy = false,
})

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

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<PcoPeopleReport>> getAll({
  String? id,
  PcoPeopleReportQuery? query,
  bool includeAllRelated = false,
  bool includeCreatedBy = false,
  bool includeUpdatedBy = false,
}) async {
  query ??= PcoPeopleReportQuery();
  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);
}