echonest-ruby-api
echonest-ruby-api copied to clipboard
Add configurator
Came across rHAPI which has a lovely configuration block. Turn also does this.
Rather than
a = Echonest::Artist.new('Weezer', 'YOUR-API-KEY')
You could do
Echonest.config do |c|
c.api_key = 'YOUR_API_KEY'
end
a = Echonest::Artist.new('Weezer')
Haven't looked in to this much but something I want to learn so happy to work on it together.
Yeah that's a much tidier way of doing it. I'll look at refactoring it.