getNextItemTimeFromSeriesAndPlanAndLive static method

Future<PcoCollection<PcoServicesItemTime>> getNextItemTimeFromSeriesAndPlanAndLive(
  1. String seriesId,
  2. String planId,
  3. String liveId, {
  4. PcoServicesItemTimeQuery? query,
  5. bool getAll = false,
})

Will get a PcoCollection of PcoServicesItemTime objects (expecting one) using a path like this: /services/v2/series/$seriesId/plans/$planId/live/$liveId/next_item_time

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<PcoServicesItemTime>>
    getNextItemTimeFromSeriesAndPlanAndLive(
  String seriesId,
  String planId,
  String liveId, {
  PcoServicesItemTimeQuery? query,
  bool getAll = false,
}) async {
  query ??= PcoServicesItemTimeQuery();
  if (getAll) query.getAll = true;

  var url =
      '/services/v2/series/$seriesId/plans/$planId/live/$liveId/next_item_time';

  return PcoCollection.fromApiCall<PcoServicesItemTime>(url,
      query: query, apiVersion: kApiVersion);
}