new Top(entry, idopt, limitopt)
Top entry.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
entry |
string | The artist to search for. |
|
id |
string |
<optional> |
The Spotify ID, if known. |
limit |
string |
<optional> |
The number of tracks to fetch. |
- Source:
Members
entry
Entry string.
- Source:
id
Spotify ID.
- Source:
limit
Number of tracks to fetch.
- Source:
spotify
Spotify request handler.
- Source:
tracks
Top tracks.
- Source:
Methods
createQueue(response) → {Promise|Queue}
Create a queue of tracks.
Parameters:
Name | Type | Description |
---|---|---|
response |
JSON | A JSON response object. |
- Source:
Returns:
A queue of tracks.
- Type
- Promise | Queue
dispatch() → {Promise|Queue}
Dispatch entry.
- Source:
Returns:
A queue of tracks.
- Type
- Promise | Queue
fetchTopTracks() → {Promise|JSON}
Fetch top tracks.
- Source:
Returns:
A JSON response.
- Type
- Promise | JSON
searchForArtist() → {Promise}
Search for the artist's ID if not known.
- Source:
Returns:
A Promise to perform the action.
- Type
- Promise