getAllFromEvent static method

Future<PcoCollection<PcoCheckInsAttendanceType>> getAllFromEvent(
  1. String eventId, {
  2. String? id,
  3. PcoCheckInsAttendanceTypeQuery? query,
  4. bool includeEvent = false,
})

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

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<PcoCheckInsAttendanceType>> getAllFromEvent(
  String eventId, {
  String? id,
  PcoCheckInsAttendanceTypeQuery? query,
  bool includeEvent = false,
}) async {
  query ??= PcoCheckInsAttendanceTypeQuery();
  query.getAll = true;

  if (includeEvent) query.include.add('event');
  var url = '/check-ins/v2/events/$eventId/attendance_types';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsAttendanceType>(url,
      query: query, apiVersion: kApiVersion);
}