get static method
Future<PcoCollection<PcoServicesMedia> >
get({
- String? id,
- PcoServicesMediaQuery? query,
- bool getAll = false,
- bool includeAttachments = false,
Will get a PcoCollection
of PcoServicesMedia objects (expecting many)
using a path like this: /services/v2/media
Available Query Filters:
archived
audio
background_audio
background_image
background_video
countdown
document
drama
image
not_archived
powerpoint
song_video
video
Getting a PcoCollection
is useful even when retrieving a single object
because it contains error data and helper functions.
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<PcoCollection<PcoServicesMedia>> get({
String? id,
PcoServicesMediaQuery? query,
bool getAll = false,
bool includeAttachments = false,
}) async {
query ??= PcoServicesMediaQuery();
if (getAll) query.getAll = true;
if (includeAttachments) query.include.add('attachments');
var url = '/services/v2/media';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoServicesMedia>(url,
query: query, apiVersion: kApiVersion);
}