Sha256: c0a2b811d234e3f06964d6cda4eb619f93fe3c51d24fcd37c64741c2e178c0a6
Contents?: true
Size: 627 Bytes
Versions: 14
Compression:
Stored size: 627 Bytes
Contents
class Caboodle::Lastfm < Caboodle::Kit description "Displays your recent and all time top Last.fm plays" required [:lastfm_username] menu "Listening" do scrape = Caboodle.scrape("http://www.last.fm/user/#{Caboodle::Site.lastfm_username}") @recent = scrape.css("#recentTracks .module-body").to_html @recent.gsub!("href=\"/", 'href="http://last.fm/') @top = scrape.css(".modulechartsartists .module-body").to_html @top.gsub!("href=\"/", 'href="http://last.fm/') haml :listening end credit "http://www.last.fm/listen/user/#{lastfm_username}", "#{lastfm_username} on Last.fm" end
Version data entries
14 entries across 14 versions & 1 rubygems