Saving A Track

Wraps around this Spotify API endpoint

Note

If you have more that 10,000 tracks saved, this will fail with an HTTP status code of 403

How to use

After creating a Spotify object, and getting a track through either .Tracks.GetTrack() or any other function/object which contains/returns track objects, the .Save() method of the track object can be used.

.Save() expects no parameters and will save a track to the current user's Your Music library.

Example

This example will:

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

B) Get a track with .Tracks.GetTrack() by the track's Spotify ID

C) Save the track

Spoofy := new Spotify()
GoodSongIMO := Spoofy.Tracks.GetTrack("4A6eJ3gOmVdD7C69N3DC7K")
GoodSongIMO.Save()