Class: Album

Album

new Album(spotify, entry, idopt, limitopt)

Create album entry.

Parameters:
Name Type Attributes Description
spotify SpotifyRequestHandler

Spotify request handler.

entry string

The album 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:

fetchTracks

Whether to fetch tracks.

Source:

id

Spotify ID.

Source:

limit

Number of albums to fetch.

Source:

name

The album name.

Source:

popularity

The album popularity.

Source:

spotify

Spotify request handler.

Source:

tracks

Album tracks.

Source:

uri

Spotify URI (a string on the form spotify:album: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

fetchAlbum() → {Promise|JSON}

Fetch album metadata.

Source:
Returns:

A JSON response.

Type
Promise | JSON

getPopularity() → {Promise|integer}

Get album popularity.

Source:
Returns:

The track popularity.

Type
Promise | integer

searchForAlbum() → {Promise|JSON}

Search for album if not known.

Source:
Returns:

A JSON response, or null if not found.

Type
Promise | JSON