getAllFromResource static method
Future<PcoCollection<PcoCalendarResourceFolder> >
getAllFromResource(
- String resourceId, {
- String? id,
- PcoCalendarResourceFolderQuery? query,
- bool includeResources = false,
Will get a PcoCollection
containing ALL PcoCalendarResourceFolder objects (expecting many)
using a path like this: /calendar/v2/resources/$resourceId/resource_folder
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>> getAllFromResource(
String resourceId, {
String? id,
PcoCalendarResourceFolderQuery? query,
bool includeResources = false,
}) async {
query ??= PcoCalendarResourceFolderQuery();
query.getAll = true;
if (includeResources) query.include.add('resources');
var url = '/calendar/v2/resources/$resourceId/resource_folder';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoCalendarResourceFolder>(url,
query: query, apiVersion: kApiVersion);
}