getChannelEpisodes method

Future<List> getChannelEpisodes(
  1. String channelId,
  2. String params
)

Get all channel episodes. This endpoint is currently unlimited.

  • channelId channelId of the user.
  • params Params obtained by getChannel.

Returns List of channel episodes in the format of getChannel episodes key.

Implementation

Future<List> getChannelEpisodes(String channelId, String params) async {
  final body = {'browseId': channelId, 'params': params};
  const endpoint = 'browse';
  final response = await sendRequest(endpoint, body);

  final results = nav(response, [
    ...SINGLE_COLUMN_TAB,
    ...SECTION_LIST_ITEM,
    ...GRID_ITEMS,
  ]);
  return parseContentList(results as List<JsonMap>, parseEpisode, key: MMRIR);
}