Module: Lieu::Client::Search
- Included in:
- Lieu::Client
- Defined in:
- lib/lieu/client/search.rb
Overview
Methods for the Place Search API
Instance Method Summary collapse
-
#nearby_search(options = {}) ⇒ Array<Hashie::Mash>
Search places within an area.
-
#radar_search(options = {}) ⇒ Array<Hashie::Mash>
Radar search places within an area.
-
#text_search(query, options = {}) ⇒ Array<Hashie::Mash>
Text search places.
Instance Method Details
#nearby_search(options = {}) ⇒ Array<Hashie::Mash>
Search places within an area.
22 23 24 25 26 |
# File 'lib/lieu/client/search.rb', line 22 def nearby_search(={}) [:location] = format_location([:location]) get('nearbysearch', ).results end |
#radar_search(options = {}) ⇒ Array<Hashie::Mash>
Radar search places within an area.
61 62 63 64 65 66 |
# File 'lib/lieu/client/search.rb', line 61 def radar_search(={}) [:location] = format_location([:location]) [:types] = format_types([:types]) if [:types] get('radarsearch', ).results end |
#text_search(query, options = {}) ⇒ Array<Hashie::Mash>
Text search places.
35 36 37 38 39 |
# File 'lib/lieu/client/search.rb', line 35 def text_search(query, ={}) .merge!(query: query) get('textsearch', ).results end |