Getting a list of tracks

Finally, with the ID strings, the list of tracks can be retrieved. Again, the method is described in the web API guide:

https://developer.spotify.com/web-api/get-playlists-tracks/

The method call requires the authorization header:

$tracks = Invoke-RestMethod -Uri https://api.spotify.com/v1/users/$user/playlists/$id/tracks -Headers $headers 

The tracks in this particular playlist are shown following:

PS> $tracks.items.track.name 
 
The Planets, Op. 32: I. Mars, the Bringer of War 
The Planets, Op. 32: II. Venus, the Bringer of Peace 
The Planets, Op. 32: III. Mercury, the Winged Messenger 
The Planets, Op. 32: IV. Jupiter, the Bringer of Jollity 
The Planets, Op. 32: V. Saturn, the Bringer of Old Age 
The Planets, Op. 32: VI. Uranus, the Magician 
The Planets, Op. 32: VII. Neptune, the Mystic  

The web API guide shows other methods that might be used when working with playlists. The application is authorized to use anything that reads information about playlists:

https://developer.spotify.com/web-api/playlist-endpoints/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.19.174