getAll static method

Future<PcoCollection<PcoCalendarResourceFolder>> getAll({
  1. String? id,
  2. PcoCalendarResourceFolderQuery? query,
  3. bool includeResources = false,
})

Will get a PcoCollection containing ALL PcoCalendarResourceFolder objects (expecting many) using a path like this: /calendar/v2/resource_folders

Available Query Filters:

  • resources
  • rooms

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<PcoCalendarResourceFolder>> getAll({
  String? id,
  PcoCalendarResourceFolderQuery? query,
  bool includeResources = false,
}) async {
  query ??= PcoCalendarResourceFolderQuery();
  query.getAll = true;

  if (includeResources) query.include.add('resources');
  var url = '/calendar/v2/resource_folders';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCalendarResourceFolder>(url,
      query: query, apiVersion: kApiVersion);
}