guilhermesad / rspotify

A ruby wrapper for the Spotify Web API
MIT License
717 stars 290 forks source link

playlist add_tracks #212

Closed EagleOne33 closed 4 years ago

EagleOne33 commented 4 years ago

Hello,

I'm trying to use rspotify in order to append some tracks to a playlist. I'm using this code:

tracks = RSpotify::Track.search('Know')[0,3]
playlist.add_tracks!(tracks)

This works.

However I set the position parameter:

tracks = RSpotify::Track.search('Know')[0,3]
playlist.add_tracks!(tracks, 1)

I get the following error.

wrong number of arguments (given 2, expected 1)

Any idea?

Thanks

EagleOne33 commented 4 years ago

I'm just an idiot. The right code is playlist.add_tracks!(tracks, position:1)