Class: ChannelVideos
Continuable of videos inside a BaseChannel
Example
const channel = await youtube.findOne(CHANNEL_NAME, {type: "channel"});
await channel.videos.next();
console.log(channel.videos.items) // first 30 videos
let newVideos = await channel.videos.next();
console.log(newVideos) // 30 loaded videos
console.log(channel.videos.items) // first 60 videos
await channel.videos.next(0); // load the rest of the videos in the channel
Hierarchy
↳
ChannelVideos
Properties
channel
• Optional
channel: BaseChannel
The channel this videos belongs to
client
• client: Client
An instance of Client
Inherited from
continuation
• Optional
continuation: null
| string
Inherited from
items
• items: VideoCompact
[] = []
Inherited from
Methods
next
▸ next(count?
): Promise
<VideoCompact
[]>
Fetch next items using continuation token
Parameters
Name | Type | Default value |
---|---|---|
count | number | 1 |
Returns
Promise
<VideoCompact
[]>