Class: Shortwave::Facade::Geo
- Defined in:
- lib/shortwave/facade/lastfm.rb
Instance Attribute Summary
Attributes inherited from Remote
Instance Method Summary collapse
-
#events(options = {}) ⇒ Object
Get all events in a specific location by country or city name.
-
#top_artists(country) ⇒ Object
Get the most popular artists on Last.fm by country.
-
#top_tracks(country, options = {}) ⇒ Object
Get the most popular tracks on Last.fm last week by country.
Methods inherited from Remote
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
locationSpecifies a location to retrieve events for (service returns nearby events by default)
latSpecifies a latitude value to retrieve events for (service returns nearby events by default)
longSpecifies a longitude value to retrieve events for (service returns nearby events by default)
pageDisplay more results by pagination
distanceFind events within a specified distance
530 531 532 |
# File 'lib/shortwave/facade/lastfm.rb', line 530 def events(={}) get(:standard, {:method => "geo.getEvents"}.merge()) end |
#top_artists(country) ⇒ Object
Get the most popular artists on Last.fm by country
countryA 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
countryA country name, as defined by the ISO 3166-1 country names standard
Options
locationA 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, ={}) get(:standard, {:method => "geo.getTopTracks", :country => country}.merge()) end |