JMPerez / spotify-web-api-js

A client-side JS wrapper for the Spotify Web API
https://jmperezperez.com/spotify-web-api-js/
MIT License
1.86k stars 260 forks source link

Support POSTing whole albums instead of just single tracks with `.addTracksToPlaylist()` #208

Open mcmxcdev opened 2 years ago

mcmxcdev commented 2 years ago

Is your feature request related to a problem? Please describe.

I am looking for the functionality to add whole artist albums to a playlist, but it seems it is only possible to add tracks for what ever reason. It's many more requests this way to the API, and I would rather keep the amount of requests small.

This is probably not possible since it is not documented in: https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist, but I was wondering if there is a way that I don't see.

Describe the solution you'd like .addTracksToPlaylist() should also support albums rather than just tracks and episodes.

Describe alternatives you've considered Iterating over all albums, making a lot of requests for tracks.