new Playlist(spotify, entry, idopt, limitopt)
Create playlist entry.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
spotify |
SpotifyRequestHandler | Spotify request handler. |
|
entry |
string | The playlist 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
The ID of the playlist.
- Source:
items
Playlist tracks.
- Source:
limit
Number of tracks to fetch.
- Source:
owner
The user who owns the playlist.
- Source:
spotify
Spotify request handler.
- Source:
uri
Spotify URI
(a string on the form spotify:user:xxxxxxxx:playlist:xxxxxxxxxxxxxxxxxxxxxx
).
- Source:
Methods
clone(response)
Clone a JSON response.
Parameters:
Name | Type | Description |
---|---|---|
response |
Object | The response. |
- Source:
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
fetchPlaylist() → {Promise|JSON}
Fetch playlist tracks.
- Source:
Returns:
A JSON response.
- Type
- Promise | JSON
searchForPlaylist() → {Promise|JSON}
Search for playlist.
- Source:
Returns:
A JSON response, or null
if not found.
- Type
- Promise | JSON