getSingleFromMedia static method
Future<PcoServicesTag?>
getSingleFromMedia(
- String mediaId,
- String id, {
- PcoServicesTagQuery? query,
Will get a single PcoServicesTag
object
using a path like this: /services/v2/media/$mediaId/tags/[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<PcoServicesTag?> getSingleFromMedia(
String mediaId,
String id, {
PcoServicesTagQuery? query,
}) async {
query ??= PcoServicesTagQuery();
var url = '/services/v2/media/$mediaId/tags/$id';
var retval = await PcoCollection.fromApiCall<PcoServicesTag>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}