getSingleFromPersonAndBlockout static method
Future<PcoServicesBlockoutDate?>
getSingleFromPersonAndBlockout(
- String personId,
- String blockoutId,
- String id, {
- PcoServicesBlockoutDateQuery? query,
Will get a single PcoServicesBlockoutDate
object
using a path like this: /services/v2/people/$personId/blockouts/$blockoutId/blockout_dates/[id]
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<PcoServicesBlockoutDate?> getSingleFromPersonAndBlockout(
String personId,
String blockoutId,
String id, {
PcoServicesBlockoutDateQuery? query,
}) async {
query ??= PcoServicesBlockoutDateQuery();
var url =
'/services/v2/people/$personId/blockouts/$blockoutId/blockout_dates/$id';
var retval = await PcoCollection.fromApiCall<PcoServicesBlockoutDate>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}