Sha256: 9024473bc5e8e32f1b847b19ae512e06c7a03e859dd014c3f46bb48e632e3f3c
Contents?: true
Size: 687 Bytes
Versions: 6
Compression:
Stored size: 687 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', :include_info => true) puts artist.url 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
6 entries across 6 versions & 2 rubygems