thelinmichael / spotify-web-api-node

A Node.js wrapper for Spotify's Web API.
http://thelinmichael.github.io/spotify-web-api-node/
MIT License
3.1k stars 499 forks source link

Create Playlist documentation does not provide information that we need to put userID as param #307

Open nishantjinsi opened 4 years ago

nishantjinsi commented 4 years ago

Summary:

Currently, the documentation/readme explains the function to call for creating a playlist. But when consuming it, I got an error saying Bad Request. And it seems that the function also needs to have the userID as a parameter to successfully create the playlist.

Current Behaviour as via the documentation: const playlist = await spotifyApi.createPlaylist(playlistName, { 'public' : false })

Acceptable Behaviour: const playlist = await spotifyApi.createPlaylist(userId,playlistName, { 'public' : false })

cordeirolucas42 commented 3 years ago

Also struggled for so long until I check the source code! Need to change this in documentation.

fbegue commented 3 years ago

yes please update documentation

Edit: Notably - the example here: examples/add-remove-replace-tracks-in-a-playlist.js

Is correct - FYI :)

MaximoMachado commented 3 years ago

I was able to use the method without the user id and it worked just fine, so I think this issue might not be a problem anymore.