getChannelSchedule method
Retrieves information about your channel's schedule.
Parameter channelName :
The name of the channel associated with this Channel Schedule.
Parameter audience :
The single audience for GetChannelScheduleRequest.
Parameter durationMinutes :
The duration in minutes of the channel schedule.
Parameter maxResults :
The maximum number of channel schedules that you want MediaTailor to
return in response to the current request. If there are more than
MaxResults channel schedules, use the value of
NextToken in the response to get the next page of results.
Parameter nextToken :
(Optional) If the playback configuration has more than
MaxResults channel schedules, use NextToken to
get the second and subsequent pages of results.
For the first GetChannelScheduleRequest request, omit this
value.
For the second and subsequent requests, get the value of
NextToken from the previous response and specify that value
for NextToken in the request.
If the previous response didn't include a NextToken element,
there are no more channel schedules to get.
Implementation
Future<GetChannelScheduleResponse> getChannelSchedule({
required String channelName,
String? audience,
String? durationMinutes,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (audience != null) 'audience': [audience],
if (durationMinutes != null) 'durationMinutes': [durationMinutes],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/channel/${Uri.encodeComponent(channelName)}/schedule',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetChannelScheduleResponse.fromJson(response);
}