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
11 12 13 |
# File 'lib/rockstar/geo.rb', line 11 def events(opts = {}, force = false) get_instance("geo.getEvents", :events, :event, opts, force) end |
#metros(country, force = false) ⇒ Object
15 16 17 |
# File 'lib/rockstar/geo.rb', line 15 def metros(country, force = false) get_instance("geo.getMetros", :metros, :metro, {:country => country}, force) end |