getAll static method

Future<PcoCollection<PcoCheckInsEvent>> getAll({
  1. String? id,
  2. PcoCheckInsEventQuery? query,
  3. bool includeAllRelated = false,
  4. bool includeAttendanceTypes = false,
  5. bool includeEventPeriods = false,
})

Will get a PcoCollection containing ALL PcoCheckInsEvent objects (expecting many) using a path like this: /check-ins/v2/events

Available Query Filters:

  • archived
  • for_headcounts
  • not_archived

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<PcoCheckInsEvent>> getAll({
  String? id,
  PcoCheckInsEventQuery? query,
  bool includeAllRelated = false,
  bool includeAttendanceTypes = false,
  bool includeEventPeriods = false,
}) async {
  query ??= PcoCheckInsEventQuery();
  query.getAll = true;
  if (includeAllRelated) query.include.addAll(PcoCheckInsEvent.canInclude);
  if (includeAttendanceTypes) query.include.add('attendance_types');
  if (includeEventPeriods) query.include.add('event_periods');
  var url = '/check-ins/v2/events';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsEvent>(url,
      query: query, apiVersion: kApiVersion);
}