gordonbisnor / lastfm
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
ba7f6a1
commit ba7f6a104499bf6a328bb59028efbec7ca0527e2
tree 2fed33f50c105c0637b957d038b1e97885d86be8
parent 8031d08289bf783f34df1e0904ecaf1ad19a6772
tree 2fed33f50c105c0637b957d038b1e97885d86be8
parent 8031d08289bf783f34df1e0904ecaf1ad19a6772
lastfm /
| name | age | message | |
|---|---|---|---|
| |
.DS_Store | ||
| |
MIT-LICENSE | Sun Jul 13 16:44:42 -0700 2008 | |
| |
README | ||
| |
Rakefile | ||
| |
example/ | Sun Jul 13 16:44:42 -0700 2008 | |
| |
init.rb | ||
| |
install.rb | Sun Jul 13 16:44:42 -0700 2008 | |
| |
lib/ | ||
| |
tasks/ | Sun Jul 13 16:44:42 -0700 2008 | |
| |
test/ | Sun Jul 13 16:44:42 -0700 2008 | |
| |
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

