Sha256: 344e1a97e96bd1f8efc71b12d45ecc4163759ba7b76d9d30a047fac0a75924ee
Contents?: true
Size: 647 Bytes
Versions: 5
Compression:
Stored size: 647 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'rockstar')) # Please enter your API-Keys into lastfm.yml first. # You can find them here : http://www.lastfm.de/api/account Rockstar.lastfm = YAML.load_file(File.join(File.dirname(__FILE__), 'lastfm.yml')) artist = Rockstar::Artist.new('Metallica') puts 'Top Tracks' puts "=" * 10 artist.top_tracks.each { |t| puts "#{t.name}" } puts puts 'Events' puts '=' * 10 artist.events.each { |e| puts "#{e.venue.city} at #{e.venue.name} on #{e.start_date.strftime("%D")}" } puts puts 'Similar Artists' puts "=" * 15 artist.similar.each { |a| puts "(#{a.match}%) #{a.name}" }
Version data entries
5 entries across 5 versions & 2 rubygems
Version | Path |
---|---|
rockstar-0.6.3 | examples/artist.rb |
rockstar-0.6.2 | examples/artist.rb |
rockstar-custom-0.6.1 | examples/artist.rb |
rockstar-0.6.1 | examples/artist.rb |
rockstar-0.6.0 | examples/artist.rb |