I have been trying to connect with the Spotify gem, have followed the documentation, but whenever I make a request it just hangs...
Here is the code I am working with:
I have created a Spotify Api Service Object which attempts to connect on initialization:
class SpotifyApiUtility
require "bundler/setup"
require "spotify"
require "logger"
require "pry"
require "io/console"
def initialize
@config = Spotify::SessionConfig.new({
api_version: Spotify::API_VERSION.to_i,
application_key: File.binread("#{Rails.root}/app/services/spotify_appkey.key"),
cache_location: "#{Rails.root}/app/services/spotify/",
settings_location: "#{Rails.root}/app/services/spotify/",
user_agent: "spotify for ruby",
callbacks: Spotify::SessionCallbacks.new,
})
session = Spotify.session_create(@config)
raise Spotify::APIError.new(error) if error
end
end
The session never gets created though, and it really just freezes. Does anyone have any suggestions about what I might be doing wrong?
--
You received this message because you are subscribed to the Google Groups "Spotify for Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-spotify...@googlegroups.com.
Visit this group at http://groups.google.com/group/ruby-spotify.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-spotify/cafef4d2-9837-4732-9849-7d141ae5c26b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Spotify for Ruby" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ruby-spotify/3gbkLVMq7mk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ruby-spotify...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-spotify/CAFRaJGCkxTbcVAmfiOR98vcVJwLLiBqW5jEH_biwy0RLmky1gQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-spotify/CAN8pEEL0p_s3FNE3gzgW2GCYxd-AhXt9TSYR_Snn_EJaZ0ucyw%40mail.gmail.com.