getPrefetchSchedule method

Future<GetPrefetchScheduleResponse> getPrefetchSchedule({
  1. required String name,
  2. required String playbackConfigurationName,
})

Retrieves a prefetch schedule for a playback configuration. A prefetch schedule allows you to tell MediaTailor to fetch and prepare certain ads before an ad break happens. For more information about ad prefetching, see Using ad prefetching in the MediaTailor User Guide.

Parameter name : The name of the prefetch schedule. The name must be unique among all prefetch schedules that are associated with the specified playback configuration.

Parameter playbackConfigurationName : Returns information about the prefetch schedule for a specific playback configuration. If you call GetPrefetchSchedule on an expired prefetch schedule, MediaTailor returns an HTTP 404 status code.

Implementation

Future<GetPrefetchScheduleResponse> getPrefetchSchedule({
  required String name,
  required String playbackConfigurationName,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/prefetchSchedule/${Uri.encodeComponent(playbackConfigurationName)}/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetPrefetchScheduleResponse.fromJson(response);
}