Permalink
Browse files

use initializer to set nestling client

  • Loading branch information...
1 parent 7c66c5e commit d46d21aabcbaa9753d1b7e57d2709a6bd511753f @mikesea committed Jul 12, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 app/models/recommender.rb
@@ -1,13 +1,11 @@
class Recommender
+ # This value should be set in an initializer file to refer to the Nestling gem.
+ # (e.g., Recommender.client = Nestling.new "APIKEY" )
class << self
attr_accessor :client
end
- # Instantiate a client to communicate with Echonest
- # Nestling is a wrapper gem for Echonest's API
- @client ||= Nestling.new
-
def self.recommend_tracks_from_artists(artists=[])
response = client.playlist.static(
artist: artists,

0 comments on commit d46d21a

Please sign in to comment.