getUploadsFromPage method
Future<ChannelUploadsList>
getUploadsFromPage(
- dynamic channelId, [
- VideoSorting videoSorting = VideoSorting.newest
Enumerates videos uploaded by the specified channel. This fetches thru all the uploads pages of the channel.
Use .nextPage() to fetch the next batch of videos.
Implementation
Future<ChannelUploadsList> getUploadsFromPage(dynamic channelId,
[VideoSorting videoSorting = VideoSorting.newest]) async {
channelId = ChannelId.fromString(channelId);
final page = await ChannelUploadPage.get(
_httpClient, (channelId as ChannelId).value, videoSorting.code);
final channel = await get(channelId);
return ChannelUploadsList(
page.uploads
.map((e) => Video(
e.videoId,
e.videoTitle,
channel.title,
channelId,
e.videoUploadDate.toDateTime(),
e.videoUploadDate,
null,
'',
e.videoDuration,
ThumbnailSet(e.videoId.value),
null,
Engagement(e.videoViews, null, null),
false,
))
.toList(),
channel.title,
channelId,
page,
_httpClient);
}