Module: Vscale::Request
- Included in:
- Api::Client
- Defined in:
- lib/vscale/api/request.rb
Constant Summary collapse
- API_ENDPOINT =
'https://api.vscale.io/v1/'.freeze
- VERB_MAP =
{ get: Net::HTTP::Get, put: Net::HTTP::Put, post: Net::HTTP::Post, patch: Net::HTTP::Patch, delete: Net::HTTP::Delete }
Instance Method Summary collapse
- #delete(path) ⇒ Object
- #get(path, params = {}) ⇒ Object
- #patch(path, params = {}) ⇒ Object
- #post(path, params = {}) ⇒ Object
- #put(path, params = {}) ⇒ Object
Instance Method Details
#delete(path) ⇒ Object
25 26 27 |
# File 'lib/vscale/api/request.rb', line 25 def delete(path) request_json :delete, path end |
#get(path, params = {}) ⇒ Object
13 14 15 |
# File 'lib/vscale/api/request.rb', line 13 def get(path, params = {}) request_json :get, path, params end |
#patch(path, params = {}) ⇒ Object
29 30 31 |
# File 'lib/vscale/api/request.rb', line 29 def patch(path, params = {}) request_json :patch, path, params end |
#post(path, params = {}) ⇒ Object
17 18 19 |
# File 'lib/vscale/api/request.rb', line 17 def post(path, params = {}) request_json :post, path, params end |
#put(path, params = {}) ⇒ Object
21 22 23 |
# File 'lib/vscale/api/request.rb', line 21 def put(path, params = {}) request_json :put, path, params end |