Skip to content

Adding tracks to playlists raises NameError? #251

@depesz

Description

@depesz

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions