getSingleFromSong static method
Future<PcoServicesSongSchedule?>
getSingleFromSong(
- String songId,
- String id, {
- PcoServicesSongScheduleQuery? query,
Will get a single PcoServicesSongSchedule
object
using a path like this: /services/v2/songs/$songId/song_schedules/[id]
Available Query Filters:
three_most_recent
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<PcoServicesSongSchedule?> getSingleFromSong(
String songId,
String id, {
PcoServicesSongScheduleQuery? query,
}) async {
query ??= PcoServicesSongScheduleQuery();
var url = '/services/v2/songs/$songId/song_schedules/$id';
var retval = await PcoCollection.fromApiCall<PcoServicesSongSchedule>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}