getSingle static method
Future<PcoCalendarResourceFolder?>
getSingle(
- String id, {
- PcoCalendarResourceFolderQuery? query,
- bool includeResources = false,
Will get a single PcoCalendarResourceFolder
object
using a path like this: /calendar/v2/resource_folders/[id]
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.
Implementation
static Future<PcoCalendarResourceFolder?> getSingle(
String id, {
PcoCalendarResourceFolderQuery? query,
bool includeResources = false,
}) async {
query ??= PcoCalendarResourceFolderQuery();
if (includeResources) query.include.add('resources');
var url = '/calendar/v2/resource_folders/$id';
var retval = await PcoCollection.fromApiCall<PcoCalendarResourceFolder>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}