Class: MusicClient
Youtube Music Client
Constructors
constructor
• new MusicClient(options?
)
Parameters
Name | Type |
---|---|
options | Partial <HTTPOptions > |
Methods
getLyrics
▸ getLyrics(id
): Promise
<undefined
| MusicLyrics
>
Get lyrics of a song
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<undefined
| MusicLyrics
>
search
▸ search(query
): Promise
<Shelf
<MusicVideoCompact
[] | MusicAlbumCompact
[] | MusicPlaylistCompact
[] | MusicArtistCompact
[]>[]>
Searches for video, song, album, playlist, or artist
Parameters
Name | Type | Description |
---|---|---|
query | string | The search query |
Returns
Promise
<Shelf
<MusicVideoCompact
[] | MusicAlbumCompact
[] | MusicPlaylistCompact
[] | MusicArtistCompact
[]>[]>
▸ search<T
>(query
, type
): Promise
<MusicSearchResult
<T
>>
Type parameters
Name | Type |
---|---|
T | extends MusicSearchType |
Parameters
Name | Type |
---|---|
query | string |
type | T |
Returns
Promise
<MusicSearchResult
<T
>>
searchAll
▸ searchAll(query
): Promise
<{ shelves
: Shelf
<MusicVideoCompact
[] | MusicAlbumCompact
[] | MusicPlaylistCompact
[] | MusicArtistCompact
[]>[] ; top?
: MusicTopShelf
}>
Searches for all video, song, album, playlist, or artist
Parameters
Name | Type | Description |
---|---|---|
query | string | The search query |
Returns
Promise
<{ shelves
: Shelf
<MusicVideoCompact
[] | MusicAlbumCompact
[] | MusicPlaylistCompact
[] | MusicArtistCompact
[]>[] ; top?
: MusicTopShelf
}>