Playing An Album

Wraps around this Spotify API endpoint

Warning

This method requires Spotify Premium, and will NOT work without Spotify Premium (see here)

Note

If an active device is not found, an error about the response status code not being 2xx will be thrown.

How to use

After creating a Spotify object, and getting an album through either .Albums.GetAlbum() or any other function/object which contains/returns album objects, the .Play() method of the returned album object can be used.

.Play() will start playing the album on the active device.

Example

This example will:

A) Create a Spotify object (which will prompt the user for authorization if it is not already done)

B) Get an album with .Albums.GetAlbum() by the album's Spotify ID

C) Play the album

Spoofy := new Spotify()
GoodAlbumIMO := Spoofy.Albums.GetAlbum("7xuWUPvk8Xb042QUigdIrE")
GoodAlbumIMO.Play()