getAllFromCampus static method

Future<PcoCollection<PcoPeopleServiceTime>> getAllFromCampus(
  1. String campusId, {
  2. String? id,
  3. PcoPeopleServiceTimeQuery? query,
})

Will get a PcoCollection containing ALL PcoPeopleServiceTime objects (expecting many) using a path like this: /people/v2/campuses/$campusId/service_times

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<PcoPeopleServiceTime>> getAllFromCampus(
  String campusId, {
  String? id,
  PcoPeopleServiceTimeQuery? query,
}) async {
  query ??= PcoPeopleServiceTimeQuery();
  query.getAll = true;

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