= ruby-lastfm {}[http://travis-ci.org/youpy/ruby-lastfm] A Ruby interface for Last.fm Web Services v2.0 == Synopsis require 'lastfm' lastfm = Lastfm.new(api_key, api_secret) token = lastfm.auth.get_token # open 'http://www.last.fm/api/auth/?api_key=xxxxxxxxxxx&token=xxxxxxxx' and grant the application lastfm.session = lastfm.auth.get_session(:token => token)['key'] lastfm.track.love(:artist => 'Hujiko Pro', :track => 'acid acid 7riddim') lastfm.track.scrobble(:artist => 'Hujiko Pro', :track => 'acid acid 7riddim') lastfm.track.update_now_playing(:artist => 'Hujiko Pro', :track => 'acid acid 7riddim') # deprecated style lastfm.track.love('Hujiko Pro', 'acid acid 7riddim') == Supported API Methods It supports methods which require {authentication}[http://www.last.fm/api/authentication]. === Album * {album.getInfo}[http://www.last.fm/api/show?service=290] === Artist * {artist.getEvents}[http://www.lastfm.jp/api/show?service=117] * {artist.getInfo}[http://www.last.fm/api/show?service=267] * {artist.getSimilar}[http://www.last.fm/api/show?service=267] * {artist.getTags}[http://www.last.fm/api/show?service=267] * {artist.getTopAlbums}[http://www.last.fm/api/show/artist.getTopAlbums] * {artist.getTopFans}[http://www.last.fm/api/show/artist.getTopFans] * {artist.getTopTracks}[http://www.last.fm/api/show/artist.getTopTracks] * {artist.search}[http://www.lastfm.jp/api/show/artist.search] === Auth * {auth.getMobileSession}[http://www.lastfm.jp/api/show?service=266] * {auth.getToken}[http://www.lastfm.jp/api/show?service=265] * {auth.getSession}[http://www.lastfm.jp/api/show?service=125] === Event * {event.getInfo}[http://www.lastfm.jp/api/show/event.getInfo] === Radio * {radio.getPlaylist}[http://www.lastfm.jp/api/show/radio.getPlaylist] === Tag * {tag.getTopArtists}[http://www.lastfm.jp/api/show/tag.getTopArtists] === Tasteometer * {tasteometer.compare}[http://www.lastfm.jp/api/show/tasteometer.compare] === Track * {track.addTags}[http://www.lastfm.jp/api/show?service=304] * {track.ban}[http://www.lastfm.jp/api/show?service=261] * {track.getCorrection}[http://www.lastfm.jp/api/show?service=447] * {track.getInfo}[http://www.lastfm.jp/api/show?service=356] * {track.getSimilar}[http://www.lastfm.jp/api/show?service=319] * {track.getTags}[http://www.lastfm.jp/api/show?service=320] * {track.getTopFans}[http://www.lastfm.jp/api/show?service=312] * {track.getTopTags}[http://www.lastfm.jp/api/show?service=289] * {track.love}[http://www.lastfm.jp/api/show?service=260] * {track.removeTag}[http://www.lastfm.jp/api/show?service=316] * {track.scrobble}[http://www.lastfm.jp/api/show?service=443] * {track.search}[http://www.lastfm.jp/api/show?service=286] * {track.share}[http://www.lastfm.jp/api/show?service=305] * {track.updateNowPlaying}[http://www.lastfm.jp/api/show?service=454] * {track.unlove}[http://www.last.fm/api/show/track.unlove] === User * {user.getFriends}[http://www.lastfm.jp/api/show?service=263] * {user.getInfo}[http://www.lastfm.jp/api/show?service=344] * {user.getLovedTracks}[http://www.lastfm.jp/api/show/user.getLovedTracks] * {user.getNeighbours}[http://www.lastfm.jp/api/show?service=264] * {user.getPersonalTags}[http://www.lastfm.jp/api/show/user.getPersonalTags] * {user.getRecentTracks}[http://www.lastfm.jp/api/show?service=278] * {user.getRecommendedEvents}[http://www.last.fm/api/show/user.getRecommendedEvents] * {user.getTopArtists}[http://www.lastfm.jp/api/show/user.getTopArtists] * {user.getTopAlbums}[http://www.lastfm.jp/api/show/user.getTopAlbums] * {user.getTopTags}[http://www.lastfm.jp/api/show/user.getTopTags] * {user.getTopTracks}[http://www.lastfm.jp/api/show/user.getTopTracks] * {user.getWeeklyAlbumList}[http://www.last.fm/api/show/user.getWeeklyAlbumChart] * {user.getWeeklyArtistList}[http://www.last.fm/api/show/user.getWeeklyArtistChart] * {user.getWeeklyChartList}[http://www.last.fm/api/show/group.getWeeklyChartList] * {user.getWeeklyTrackList}[http://www.last.fm/api/show/user.getWeeklyTrackChart] === Geo * {geo.getEvents}[http://www.lastfm.jp/api/show?service=270] === Library * {library.getArtists}[http://www.lastfm.jp/api/show?service=322] * {library.getTracks}[http://www.last.fm/api/show/library.getTracks] === Chart * {chart.getHypedArtists}[http://www.lastfm.jp/api/show/chart.getHypedArtists] == Installation === Archive Installation rake install === Gem Installation gem update --system gem install gemcutter gem tumble gem install lastfm == Features/Problems == Comitters see https://github.com/youpy/ruby-lastfm/contributors == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright Copyright (c) 2010 youpy. See LICENSE for details.