getSingleFromSong static method

Future<PcoServicesTag?> getSingleFromSong(
  1. String songId,
  2. String id, {
  3. PcoServicesTagQuery? query,
})

Will get a single PcoServicesTag object using a path like this: /services/v2/songs/$songId/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?> getSingleFromSong(
  String songId,
  String id, {
  PcoServicesTagQuery? query,
}) async {
  query ??= PcoServicesTagQuery();

  var url = '/services/v2/songs/$songId/tags/$id';
  var retval = await PcoCollection.fromApiCall<PcoServicesTag>(url,
      query: query, apiVersion: kApiVersion);
  return retval.items.isEmpty ? null : retval.items.first;
}