Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Last.fm API wrapper for Ruby

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 rscrobbler.gemspec
README.md

rscrobbler

Ruby library for wrapping Last.fm API methods as documented: www.last.fm/api

Getting Started

Install the gem: https://rubygems.org/gems/rscrobbler

gem install rscrobbler

Generate your Last.fm auth token:

generate_lastfm_auth_token

Configure the library with your LastFM credentials:

include 'rscrobbler'
LastFM.establish_session do |session|
  session.api_key    = (see: www.last.fm/api/account)
  session.api_secret = (see: www.last.fm/api/account)
  session.username   = (last.fm username)
  session.auth_token = (auth token from generate_lastfm_auth_token)
end

Once authenticated, call API methods using the following syntax:

LastFM::Track.scrobble( artist:'Childish Gambino', track:'Bonfire', timestamp:Time.now )

See documentation for detailed method and parameter information.

Something went wrong with that request. Please try again.