bih/spotify-ruby

Added native support for ENV

Closed this issue · 0 comments

bih commented

Make it possible for @auth = Spotify::Auth.new to search in ENV for the application credentials without having to provide through the ENV details directly to the Spotify::Auth class.

Before:

@auth = Spotify::Accounts.new({
  client_id: ENV["SPOTIFY_CLIENT_ID"],
  client_secret: ENV["SPOTIFY_CLIENT_SECRET"],
  redirect_uri: ENV["SPOTIFY_REDIRECT_URI"]
})

After:

@auth = Spotify::Accounts.new