Class: Qype::Client
Instance Method Summary collapse
- #get(path, options = {}) ⇒ Object
- #get_place(place_id) ⇒ Object
-
#initialize(api_key, api_secret, base_uri = nil) ⇒ Client
constructor
A new instance of Client.
- #nearby_places(latitude, longitude, options = {}) ⇒ Object
- #search_places(search_term, location_name) ⇒ Object
Constructor Details
#initialize(api_key, api_secret, base_uri = nil) ⇒ Client
Returns a new instance of Client.
7 8 9 10 |
# File 'lib/qype/client.rb', line 7 def initialize(api_key, api_secret, base_uri = nil) Client.[:oauth] = { :key => api_key, :secret => api_secret, :method => 'HMAC-SHA1' } Client.base_uri(base_uri) if base_uri end |
Instance Method Details
#get(path, options = {}) ⇒ Object
12 13 14 |
# File 'lib/qype/client.rb', line 12 def get(path, = {}) self.class.get(path, ) end |
#get_place(place_id) ⇒ Object
24 25 26 |
# File 'lib/qype/client.rb', line 24 def get_place(place_id) Place.get(self, place_id) end |