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, delete: Net::HTTP::Delete }
Instance Method Summary collapse
- #delete(path, params = {}) ⇒ Object
- #get(path, params = {}) ⇒ Object
- #patch(path, params = {}) ⇒ Object
- #post(path, params = {}) ⇒ Object
- #put(path, params = {}) ⇒ Object
Instance Method Details
#delete(path, params = {}) ⇒ Object
24 25 26 |
# File 'lib/vscale/api/request.rb', line 24 def delete(path, params = {}) request_json :delete, path, params end |
#get(path, params = {}) ⇒ Object
12 13 14 |
# File 'lib/vscale/api/request.rb', line 12 def get(path, params = {}) request_json :get, path, params end |
#patch(path, params = {}) ⇒ Object
28 29 30 |
# File 'lib/vscale/api/request.rb', line 28 def patch(path, params = {}) request_json :patch, path, params end |
#post(path, params = {}) ⇒ Object
16 17 18 |
# File 'lib/vscale/api/request.rb', line 16 def post(path, params = {}) request_json :post, path, params end |
#put(path, params = {}) ⇒ Object
20 21 22 |
# File 'lib/vscale/api/request.rb', line 20 def put(path, params = {}) request_json :put, path, params end |