get static method

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

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

Available Query Filters:

  • resources
  • rooms

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