Skip to content

Instantly share code, notes, and snippets.

@caike
Created December 8, 2010 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caike/733989 to your computer and use it in GitHub Desktop.
Save caike/733989 to your computer and use it in GitHub Desktop.
last.fm's current song
url = "http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=mofouser&api_key=mofoapikey"
resp = HTTParty::get(url)
p resp.parsed_response["lfm"]["recenttracks"]["track"].first {|t| t["nowplaying"] == "true" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment