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