getUserVideos method
Retrieve a list of videos for a given user.
Call this function again with the returned params to get the full list.
channelIdchannelIdof the user.paramsparamsobtained by getUser.
Returns List of user videos.
Implementation
Future<List> getUserVideos(String channelId, String params) async {
const endpoint = 'browse';
final body = {'browseId': channelId, 'params': params};
final response = await sendRequest(endpoint, body);
final results = nav(response, [
...SINGLE_COLUMN_TAB,
...SECTION_LIST_ITEM,
...GRID_ITEMS,
], nullIfAbsent: true);
if (results == null) return [];
return parseContentList(List<JsonMap>.from(results as List), parseVideo);
}