Class: Shortwave::Facade::Geo

Inherits:
Remote
  • Object
show all
Defined in:
lib/shortwave/facade/lastfm.rb

Instance Attribute Summary

Attributes inherited from Remote

#session

Instance Method Summary collapse

Methods inherited from Remote

#initialize

Constructor Details

This class inherits a constructor from Shortwave::Facade::Remote

Instance Method Details

#events(options = {}) ⇒ Object

Get all events in a specific location by country or city name.

Options

location

Specifies a location to retrieve events for (service returns nearby events by default)

lat

Specifies a latitude value to retrieve events for (service returns nearby events by default)

long

Specifies a longitude value to retrieve events for (service returns nearby events by default)

page

Display more results by pagination

distance

Find events within a specified distance



530
531
532
# File 'lib/shortwave/facade/lastfm.rb', line 530

def events(options={})
  get(:standard, {:method => "geo.getEvents"}.merge(options))
end

#top_artists(country) ⇒ Object

Get the most popular artists on Last.fm by country

country

A country name, as defined by the ISO 3166-1 country names standard



547
548
549
# File 'lib/shortwave/facade/lastfm.rb', line 547

def top_artists(country)
  get(:standard, {:method => "geo.getTopArtists", :country => country})
end

#top_tracks(country, options = {}) ⇒ Object

Get the most popular tracks on Last.fm last week by country

country

A country name, as defined by the ISO 3166-1 country names standard

Options

location

A metro name, to fetch the charts for (must be within the country specified)



540
541
542
# File 'lib/shortwave/facade/lastfm.rb', line 540

def top_tracks(country, options={})
  get(:standard, {:method => "geo.getTopTracks", :country => country}.merge(options))
end