Class: SendpulseClient::Connection
- Inherits:
-
Object
- Object
- SendpulseClient::Connection
- Includes:
- HTTParty
- Defined in:
- lib/sendpulse_client/connection.rb
Defined Under Namespace
Classes: Token
Class Method Summary collapse
- .delete_request(path, body = {}) ⇒ Object
- .get_request(path, data = {}) ⇒ Object
- .post_request(path, data = {}) ⇒ Object
Class Method Details
.delete_request(path, body = {}) ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/sendpulse_client/connection.rb', line 54 def delete_request(path, body = {}) body = { body: data, headers: auth_headers } delete(path, body).parsed_response end |
.get_request(path, data = {}) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/sendpulse_client/connection.rb', line 36 def get_request(path, data = {}) params = { query: data, headers: auth_headers } get(path, params).parsed_response end |
.post_request(path, data = {}) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/sendpulse_client/connection.rb', line 45 def post_request(path, data = {}) body = { body: data, headers: auth_headers } post(path, body).parsed_response end |