Class: Doconomy::Api::Client
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#delete(endpoint, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP DELETE request.
-
#get(endpoint, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP GET request.
-
#head(endpoint, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP HEAD request.
-
#post(endpoint, payload = nil, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP POST request.
-
#put(endpoint, payload = nil, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP PUT request.
Methods inherited from Base
Instance Method Details
#delete(endpoint, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP DELETE request
51 52 53 |
# File 'lib/doconomy/api/client.rb', line 51 def delete(endpoint, headers = { 'Content-Type' => 'application/json' }, = {}) request(:delete, endpoint, nil, headers, ) end |
#get(endpoint, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP GET request
15 16 17 |
# File 'lib/doconomy/api/client.rb', line 15 def get(endpoint, headers = { 'Content-Type' => 'application/json' }, = {}) request(:get, endpoint, nil, headers, ) end |
#head(endpoint, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP HEAD request
63 64 65 |
# File 'lib/doconomy/api/client.rb', line 63 def head(endpoint, headers = { 'Content-Type' => 'application/json' }, = {}) request(:head, endpoint, nil, headers, ) end |
#post(endpoint, payload = nil, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP POST request
27 28 29 |
# File 'lib/doconomy/api/client.rb', line 27 def post(endpoint, payload = nil, headers = { 'Content-Type' => 'application/json' }, = {}) request(:post, endpoint, payload, headers, ) end |
#put(endpoint, payload = nil, headers = { 'Content-Type' => 'application/json' }, options = {}) ⇒ Hash
It makes HTTP PUT request
39 40 41 |
# File 'lib/doconomy/api/client.rb', line 39 def put(endpoint, payload = nil, headers = { 'Content-Type' => 'application/json' }, = {}) request(:put, endpoint, payload, headers, ) end |