rspotify
rspotify copied to clipboard
Adding tracks to playlists raises NameError?
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?