Skip to main content

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​

Properties​

channel​

• Optional channel: BaseChannel

The channel this videos belongs to


client​

• client: Client

An instance of Client

Inherited from​

Continuable.client


continuation​

• Optional continuation: null | string

Inherited from​

Continuable.continuation


items​

• items: VideoCompact[] = []

Inherited from​

Continuable.items

Methods​

next​

▸ next(count?): Promise<VideoCompact[]>

Fetch next items using continuation token

Parameters​

NameTypeDefault value
countnumber1

Returns​

Promise<VideoCompact[]>

Inherited from​

Continuable.next