getSingleFromEvent static method
Will get a single PcoCheckInsEventLabel
object
using a path like this: /check-ins/v2/events/$eventId/event_labels/[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<PcoCheckInsEventLabel?> getSingleFromEvent(
String eventId,
String id, {
PcoCheckInsEventLabelQuery? query,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeLabel = false,
}) async {
query ??= PcoCheckInsEventLabelQuery();
if (includeAllRelated)
query.include.addAll(PcoCheckInsEventLabel.canInclude);
if (includeEvent) query.include.add('event');
if (includeLabel) query.include.add('label');
var url = '/check-ins/v2/events/$eventId/event_labels/$id';
var retval = await PcoCollection.fromApiCall<PcoCheckInsEventLabel>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}