Class: AngieCoreApi::Map
- Inherits:
-
Object
- Object
- AngieCoreApi::Map
- Defined in:
- lib/angie-core-api/map.rb
Class Method Summary collapse
- .local_places(origin, query, radius, unit, locale) ⇒ Object
- .place_details(place_id) ⇒ Object
- .travel_time(origin, location, radius, unit, size, zoom, locale) ⇒ Object
Class Method Details
.local_places(origin, query, radius, unit, locale) ⇒ Object
10 11 12 13 |
# File 'lib/angie-core-api/map.rb', line 10 def self.local_places(origin, query, radius, unit, locale) url = "/maps/places/#{origin}/#{URI.encode_www_form_component(query)}/#{radius}/#{unit}/#{locale}" Client.data(:get, url) end |
.place_details(place_id) ⇒ Object
15 16 17 |
# File 'lib/angie-core-api/map.rb', line 15 def self.place_details(place_id) Client.data(:get, "/maps/places/#{place_id}") end |
.travel_time(origin, location, radius, unit, size, zoom, locale) ⇒ Object
5 6 7 8 |
# File 'lib/angie-core-api/map.rb', line 5 def self.travel_time(origin, location, radius, unit, size, zoom, locale) url = "/maps/distancematrix/#{origin}/#{URI.encode_www_form_component(location)}/#{radius}/#{unit}/#{size}/#{zoom}/#{locale}" Client.data(:get, url) end |