getUserVideos method
Retrieve a list of videos for a given user.
Call this function again with the returned params
to get the full list.
channelId
channelId
of the user.params
params
obtained 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(results as List<JsonMap>, parseVideo);
}