Class: Rockstar::Geo
Instance Method Summary collapse
-
#events(opts = {}, force = false) ⇒ Object
Get events in a specific location.
- #metros(country, force = false) ⇒ Object
Methods inherited from Base
connection, fetch_and_parse, get_instance
Instance Method Details
#events(opts = {}, force = false) ⇒ Object
Get events in a specific location. Opts can be
-
:location => ‘madrid’ # A city name from geo.metros
-
:lat => 50.0, :long => 14.0 # A geo point
Additionally you can set the distance from that point with
:distance => 50 # 50 km from the given location
13 14 15 |
# File 'lib/rockstar/geo.rb', line 13 def events(opts = {}, force = false) get_instance("geo.getEvents", :events, :event, opts, force) end |
#metros(country, force = false) ⇒ Object
17 18 19 |
# File 'lib/rockstar/geo.rb', line 17 def metros(country, force = false) get_instance("geo.getMetros", :metros, :metro, {:country => country}, force) end |