new Track( spotify, data )

Description

Represents the track.

Parameters
Name Type Description
spotify Spotify

The spotify client.

data object

The track object data.

Details

Members


spotify :Spotify

Description

The spotify client.

Details

audio :Audio

Description

Shortcut to the tracks audio.

Details

Methods


save() → {Promise.<(Status|HTTPError|ApiError)>}

Description

Shortcut to save the track.

Returns
Details

remove() → {Promise.<(Status|HTTPError|ApiError)>}

Description

Shortcut to remove the track.

Returns
Details

starred() → {Promise.<(Array.<boolean>|HTTPError|ApiError)>}

Description

Shortcut to check if a songs saved in the current Spotify user's 'Your Music' library.

Returns
Details

queue( device ) → {Promise.<(Status|HTTPError|ApiError)>}

Description

Shortcut to queue a track.

Parameters
Name Type Description
device string

The id of the device this command is targeting. If not supplied, the user's currently active device is the target.

Returns
Details