Types
Playlist Types
Playlist search, playlist metadata, item and paginated result shapes.
PlaylistResult
ts
interface PlaylistResult extends BaseWithAuthor {
type: "playlist";
contentType: string;
videoCount: number;
}PlaylistInfo
ts
interface PlaylistInfo extends BaseWithAuthor {
description: string;
videoCount: string;
viewsCount: string;
}PlaylistVideo
ts
interface PlaylistVideo extends BaseWithAuthor {
type: "video";
index: string;
views: string;
duration: string;
seconds: number;
publishedAt: string;
}PlaylistMetadata
ts
interface PlaylistMetadata {
ytPage: number;
ytPageSize: number;
userPage: number;
userPageSize: number;
hasNextPage: boolean;
totalVideos: number;
resultRange: [number, number];
expectedPages: number;
}PlaylistDetailsResult
ts
interface PlaylistDetailsResult {
playlist: PlaylistInfo;
videos: PlaylistVideo[];
metadata: PlaylistMetadata;
nextPage: () => Promise<PlaylistDetailsResult | null>;
}PlaylistOptions
ts
interface PlaylistOptions {
limit?: number;
}