get static method

Future<PcoCollection<PcoPeopleApp>> get({
  1. String? id,
  2. PcoPeopleAppQuery? query,
  3. bool getAll = false,
})

Will get a PcoCollection of PcoPeopleApp objects (expecting many) using a path like this: /people/v2/apps

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<PcoPeopleApp>> get({
  String? id,
  PcoPeopleAppQuery? query,
  bool getAll = false,
}) async {
  query ??= PcoPeopleAppQuery();
  if (getAll) query.getAll = true;

  var url = '/people/v2/apps';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoPeopleApp>(url,
      query: query, apiVersion: kApiVersion);
}