gordonbisnor / lastfm

LastFM API plugin for Rails

This URL has Read+Write access

gordonbisnor (author)
Sun Jul 13 16:44:42 -0700 2008
commit  ba7f6a104499bf6a328bb59028efbec7ca0527e2
tree    2fed33f50c105c0637b957d038b1e97885d86be8
parent  8031d08289bf783f34df1e0904ecaf1ad19a6772
lastfm /
name age message
file .DS_Store Loading commit data...
file MIT-LICENSE Sun Jul 13 16:44:42 -0700 2008 Added the files [gordonbisnor]
file README
file Rakefile
directory example/ Sun Jul 13 16:44:42 -0700 2008 Added the files [gordonbisnor]
file init.rb
file install.rb Sun Jul 13 16:44:42 -0700 2008 Added the files [gordonbisnor]
directory lib/
directory tasks/ Sun Jul 13 16:44:42 -0700 2008 Added the files [gordonbisnor]
directory test/ Sun Jul 13 16:44:42 -0700 2008 Added the files [gordonbisnor]
file uninstall.rb
README
LastFm
============

Provides an easy way to query LastFM. 

This isn't a comprehensive plugin,
it just includes the queries that I required for my site.  

Make sure to put your api key in config/last_fm.yml

Example
=======

albums_controller.rb --

  class AlbumsController < ApplicationController
   last_fm

    def show
      @album = Album.find(1)
      @current_events = last_fm_artists_current_events(@album.band.name)
      end
  end

albums/show.html.erb --

<% @current.events.each do |event %>
  <p><%= event['bands] %></p>
  <p><%= event['date] %></p>
<% end %>

Copyright (c) 2008 Gordon B. Isnor, released under the MIT license