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
Class Method Details
.get_request(path, data = {}) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/sendpulse_client/connection.rb', line 36 def get_request(path, data = {}) params = { query: data, headers: auth_headers } response = get(path, params) puts response.parsed_response end |
.post_request(path, data = {}) ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'lib/sendpulse_client/connection.rb', line 46 def post_request(path, data = {}) body = { body: data, headers: auth_headers } response = post(path, body) puts response.parsed_response end |