This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
jnunemaker (author)
Mon Oct 22 21:15:38 -0700 2007
commit cee1978efeb57615573c14880602a8d7705334d1
tree fe0ab1a23fe884843df02fef03e92137503cd5df
parent b5208ad259f90dc86d9ce0ce1d574e27d1104791
tree fe0ab1a23fe884843df02fef03e92137503cd5df
parent b5208ad259f90dc86d9ce0ce1d574e27d1104791
| name | age | message | |
|---|---|---|---|
| |
History.txt | Thu May 10 07:14:23 -0700 2007 | [jnunemaker] |
| |
MIT-LICENSE | Mon Oct 22 21:00:36 -0700 2007 | [jnunemaker] |
| |
Manifest.txt | Thu May 10 07:14:23 -0700 2007 | [jnunemaker] |
| |
README.txt | Thu May 10 07:14:23 -0700 2007 | [jnunemaker] |
| |
Rakefile | Thu May 10 07:58:59 -0700 2007 | [jnunemaker] |
| |
examples/ | Thu May 10 07:14:23 -0700 2007 | [jnunemaker] |
| |
lib/ | Mon Oct 22 21:15:38 -0700 2007 | [jnunemaker] |
| |
setup.rb | Thu May 10 07:14:23 -0700 2007 | [jnunemaker] |
| |
test/ | Thu May 10 07:14:23 -0700 2007 | [jnunemaker] |
| |
website/ | Thu May 10 07:58:59 -0700 2007 | [jnunemaker] |
README.txt
=Scrobbler Scrobbler is a wrapper for the audioscrobbler web services (http://www.audioscrobbler.net/data/webservices/). Below is just a sampling of how easy this lib is to use. == Users user = Scrobbler::User.new('jnunemaker') puts "#{user.username}'s Recent Tracks" puts "=" * (user.username.length + 16) user.recent_tracks.each { |t| puts t.name } puts puts puts "#{user.username}'s Top Tracks" puts "=" * (user.username.length + 13) user.top_tracks.each { |t| puts "(#{t.playcount}) #{t.name}" } == Albums album = Scrobbler::Album.new('Carrie Underwood', 'Some Hearts', :include_info => true) puts "Album: #{album.name}" puts "Artist: #{album.artist}" puts "Reach: #{album.reach}" puts "URL: #{album.url}" puts "Release Date: #{album.release_date.strftime('%m/%d/%Y')}" puts puts puts "Tracks" longest_track_name = album.tracks.collect(&:name).sort { |x, y| y.length <=> x.length }.first.length puts "=" * longest_track_name album.tracks.each { |t| puts t.name } ==Artists artist = Scrobbler::Artist.new('Carrie Underwood') puts 'Top Tracks' puts "=" * 10 artist.top_tracks.each { |t| puts "(#{t.reach}) #{t.name}" } puts puts 'Similar Artists' puts "=" * 15 artist.similar.each { |a| puts "(#{a.match}%) #{a.name}" } ==Tags tag = Scrobbler::Tag.new('country') puts 'Top Albums' tag.top_albums.each { |a| puts "(#{a.count}) #{a.name} by #{a.artist}" } puts puts 'Top Tracks' tag.top_tracks.each { |t| puts "(#{t.count}) #{t.name} by #{t.artist}" } ==Tracks track = Scrobbler::Track.new('Carrie Underwood', 'Before He Cheats') puts 'Fans' puts "=" * 4 track.fans.each { |u| puts "(#{u.weight}) #{u.username}" }




