LastFm
Uses the Last.fm API to retrieve information for Artists and Albums
Usage
Add gem 'radavis_last_fm'
to your Gemfile, or gem install radavis_last_fm
.
Set the lastfm_api_key
environment variable.
require 'last_fm'
artist = LastFM::Artist.search('Nirvana').first
artist.name # 'Nirvana'
artist.image # 'http://userserve-ak.last.fm/serve/126s/416571.jpg'
album = LastRubyFm::Album.search('Purple')[1]
album.artist # 'Stone Temple Pilots'
album.tracks # retrieves a list of LastRubyFm::Track objects for the given album
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request