rspotify icon indicating copy to clipboard operation
rspotify copied to clipboard

Adding tracks to playlists raises NameError?

Open depesz opened this issue 2 years ago • 0 comments

So, I did:

RSpotify.authenticate("...", "...")
fool = RSpotify::User.find('depesz').playlists.first
albums = RSpotify::Artist.search('F.O.O.L').first.albums(limit: 33)
albums.each { |x| puts "== #{x.name}"; fool.add_tracks!( x.tracks ) };

It didn't add any tracks, and ended immediately with:

NameError: uninitialized class variable @@users_credentials in RSpotify::User
from /home/depesz/.local/share/gem/gems/rspotify-2.11.1/lib/rspotify/user.rb:65:in `oauth_header'

Clearly I must have done something wrong, but what?

depesz avatar Apr 14 '22 11:04 depesz