Module: YellowApi::Client::Request
- Included in:
- YellowApi::Client
- Defined in:
- lib/yellow_api/client/request.rb
Instance Method Summary collapse
Instance Method Details
#get(path, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/yellow_api/client/request.rb', line 6 def get(path, = {}) # stuff that's sent with every request # but define by api initialization [:apikey] = apikey [:fmt] = fmt [:UID] = uid request(:get, path, ) end |
#request(method, path, options) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/yellow_api/client/request.rb', line 16 def request(method, path, ) response = connection.send(method) do |request| request.url(path, ) end response.body end |