getAllFromMedia static method
Future<PcoCollection<PcoServicesAttachment> >
getAllFromMedia(
- String mediaId, {
- String? id,
- PcoServicesAttachmentQuery? query,
- bool includeZooms = false,
Will get a PcoCollection
containing ALL PcoServicesAttachment objects (expecting many)
using a path like this: /services/v2/media/$mediaId/attachments
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<PcoServicesAttachment>> getAllFromMedia(
String mediaId, {
String? id,
PcoServicesAttachmentQuery? query,
bool includeZooms = false,
}) async {
query ??= PcoServicesAttachmentQuery();
query.getAll = true;
if (includeZooms) query.include.add('zooms');
var url = '/services/v2/media/$mediaId/attachments';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoServicesAttachment>(url,
query: query, apiVersion: kApiVersion);
}