Class: Wes::Data::API::Client
- Inherits:
-
Object
- Object
- Wes::Data::API::Client
- Defined in:
- lib/wes/data/api/client.rb
Instance Method Summary collapse
- #delete(path) ⇒ Object
- #get(path) ⇒ Object
- #post(path, options) ⇒ Object
- #put(path, options) ⇒ Object
Instance Method Details
#delete(path) ⇒ Object
26 27 28 29 |
# File 'lib/wes/data/api/client.rb', line 26 def delete(path) api_response = time_method(path, 'DELETE') { request.delete(path) } response(api_response) end |
#get(path) ⇒ Object
9 10 11 12 |
# File 'lib/wes/data/api/client.rb', line 9 def get(path) api_response = time_method(path, 'GET') { request.get(path) } response(api_response) end |
#post(path, options) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/wes/data/api/client.rb', line 14 def post(path, ) api_response = time_method(path, 'POST') do request.post(path, ) end response(api_response) end |
#put(path, options) ⇒ Object
21 22 23 24 |
# File 'lib/wes/data/api/client.rb', line 21 def put(path, ) api_response = time_method(path, 'PUT') { request.put(path, ) } response(api_response) end |