UNPKG

@alufi/ytsr

Version:

A ytsr fork. Made for Alufi Bot Utility

73 lines (65 loc) 1.9 kB
declare module '@alufi/ytsr' { namespace ytsr { interface Options { safeSearch?: boolean; limit?: number; continuation?: string; hl?: string; gl?: string; utcOffsetMinutes?: number; type?: 'video' | 'playlist'; } interface Image { url: string | null; width: number; height: number; } interface Video { type: 'video'; id: string; name: string; url: string; thumbnail: string; isLive: boolean; views: number; duration: string; author: { name: string; channelID: string; url: string; bestAvatar: Image; avatars: Image[]; ownerBadges: string[]; verified: boolean; } | null; } interface Playlist { type: 'playlist'; id: string; name: string; url: string; length: number; owner: { name: string; channelID: string; url: string; ownerBadges: string[]; verified: boolean; } | null; } interface VideoResult { query: string; data: Video[]; results: number; } interface PlaylistResult { query: string; data: Playlist[]; results: number; } } function ytsr(id: string): Promise<ytsr.VideoResult>; function ytsr(id: string, options: ytsr.Options & { type: 'playlist' }): Promise<ytsr.PlaylistResult>; function ytsr(id: string, options: ytsr.Options): Promise<ytsr.VideoResult>; export = ytsr; }