Module: LibTAD::Client::PlacesService
- Included in:
- LibTAD::Client
- Defined in:
- lib/services/places.rb
Overview
Places API.
Instance Method Summary collapse
-
#get_places(geo: nil, lang: nil) ⇒ Array<::LibTAD::Places::Place>
The Places service can be used to retrieve the list of supported places.
Instance Method Details
#get_places(geo: nil, lang: nil) ⇒ Array<::LibTAD::Places::Place>
The Places service can be used to retrieve the list of supported places. The ids for the places are then used in the other services to indicate the location to be queried.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/services/places.rb', line 11 def get_places(geo: nil, lang: nil) args = { geo: geo, lang: lang }.compact response = get('places', args) places = response.fetch('places', []) places.collect do |e| ::LibTAD::Places::Place.new(e) end end |