Module: Scrobbler

Defined in:
lib/scrobbler/tag.rb,
lib/scrobbler/user.rb,
lib/scrobbler/rest.rb,
lib/scrobbler/base.rb,
lib/scrobbler/chart.rb,
lib/scrobbler/album.rb,
lib/scrobbler/track.rb,
lib/scrobbler/artist.rb,
lib/scrobbler/playing.rb,
lib/scrobbler/version.rb,
lib/scrobbler/scrobble.rb,
lib/scrobbler/simpleauth.rb

Overview

Below are examples of how to find an artists top tracks and similar 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}" }

Would output something similar to:

Top Tracks
==========
(8797) Before He Cheats
(3574) Don't Forget to Remember Me
(3569) Wasted
(3246) Some Hearts
(3142) Jesus, Take the Wheel
(2600) Starts With Goodbye
(2511) Jesus Take The Wheel
(2423) Inside Your Heaven
(2328) Lessons Learned
(2040) I Just Can't Live a Lie
(1899) Whenever You Remember
(1882) We're Young and Beautiful
(1854) That's Where It Is
(1786) I Ain't in Checotah Anymore
(1596) The Night Before (Life Goes On)

Similar Artists
===============
(100%) Rascal Flatts
(84.985%) Keith Urban
(84.007%) Kellie Pickler
(82.694%) Katharine McPhee
(81.213%) Martina McBride
(79.397%) Faith Hill
(77.121%) Tim McGraw
(75.191%) Jessica Simpson
(75.182%) Sara Evans
(75.144%) The Wreckers
(73.034%) Kenny Chesney
(71.765%) Dixie Chicks
(71.084%) Kelly Clarkson
(69.535%) Miranda Lambert
(66.952%) LeAnn Rimes
(66.398%) Mandy Moore
(65.817%) Bo Bice
(65.279%) Diana DeGarmo
(65.115%) Gretchen Wilson
(62.982%) Clay Aiken
(62.436%) Ashlee Simpson
(62.160%) Christina Aguilera

Defined Under Namespace

Modules: REST Classes: Album, Artist, Base, Chart, Playing, Scrobble, SimpleAuth, Tag, Track, User

Constant Summary

API_URL =
'http://ws.audioscrobbler.com/'
API_VERSION =
'1.0'
Version =
'0.2.3'
AUTH_URL =
'http://post.audioscrobbler.com'
AUTH_VER =
'1.2.1'