Class SongSearcher
Constructor
constructor(options?: SongSearcherOptionsinterface SongSearcherOptionsutils/SongSearcherOptions)
Creates a new SongSearcher
· options - undefined
Properties
Methods
search(): Promiseexternal Promise<SearchedSonginterface SearchedSongutils/SearchedSong[]>[src]
Searchs a song
· args - undefined
· options - undefined
Returns
undefinedextractVideoInfo(url: string): Promiseexternal Promise<Songinterface Songutils/Song>[src]
Extracts infos from a YouTube video
· url - undefined
Returns
undefinedfetchPlaylist(url: string): Promiseexternal Promise<SearchedPlaylistinterface SearchedPlaylistutils/SearchedPlaylist[]>[src]
Searchs a playlist and returns the 100 first songs of it. This method also works for YouTube mixes.
· url - The YouTube playlist url.
Returns
undefinedextractPlaylistInfo(url: string): Promiseexternal Promise<Playlistinterface Playlistutils/Playlist>[src]
Extracts playlist title and description. Works for YouTube mixes too. The returned description will be empty if the inserted link is a mix.
· url - The YouTube playlist url.
Returns
undefinedprivate _addResults(results: any[], returnData: SearchedSonginterface SearchedSongutils/SearchedSong[]): void[src]
Adds results for a searched video
· results - undefined
· returnData - undefined
private _initInnerTubeApiKey(): Promiseexternal Promise<void>[src]
Gets an InnerTube API key and set the Innertube context, depending on your computer
Returns
undefinedprivate _generateExtractBody(url: string): object[src]
Generates body to fetch YouTube API
· url - undefined
Returns
undefinedprivate _humanizeSeconds(secs: number): string[src]
Humanizes seconds
· secs - undefined