get static method

Future<PcoCollection<PcoPeopleForm>> get({
  1. String? id,
  2. PcoPeopleFormQuery? query,
  3. bool getAll = false,
  4. bool includeCampus = false,
})

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

Available Query Filters:

  • archived
  • closed
  • not_archived
  • open
  • recently_viewed
  • with_recoverable

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

  if (includeCampus) query.include.add('campus');
  var url = '/people/v2/forms';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoPeopleForm>(url,
      query: query, apiVersion: kApiVersion);
}