Class: TflApi::Client::Cabwise
- Inherits:
-
Object
- Object
- TflApi::Client::Cabwise
- Defined in:
- lib/tfl_api_client/cabwise.rb
Overview
This class communicates with the TFL “/Cabwise” API to obtain details about taxis and minicabs contact information.
Instance Method Summary collapse
-
#initialize(client) ⇒ Cabwise
constructor
Initialize the Cabwise object and store the reference to Client object.
-
#search(latitude, longitude, params = {}) ⇒ Hash
Returns all contact information for taxis and minicabs known by the TFL service within based upon the given search query.
Constructor Details
#initialize(client) ⇒ Cabwise
Initialize the Cabwise object and store the reference to Client object
40 41 42 |
# File 'lib/tfl_api_client/cabwise.rb', line 40 def initialize(client) @client = client end |
Instance Method Details
#search(latitude, longitude, params = {}) ⇒ Hash
Returns all contact information for taxis and minicabs known by the TFL service within based upon the given search query.
53 54 55 |
# File 'lib/tfl_api_client/cabwise.rb', line 53 def search(latitude, longitude, params={}) @client.get('/Cabwise/search', params.merge({ lat: latitude, lon: longitude })) end |