Class: Little::Sender
- Inherits:
-
Object
- Object
- Little::Sender
- Defined in:
- lib/little/sender.rb
Constant Summary collapse
- BASE_URL =
'/api/v1/'
- HEADERS =
{'Accept' => 'application/json'}
Instance Method Summary collapse
- #delete_request(resource, data, signature_keys, url) ⇒ Object
- #get_request(resource, data, signature_keys, url) ⇒ Object
-
#initialize(configuration) ⇒ Sender
constructor
A new instance of Sender.
- #post_request(resource, data, signature_keys, url) ⇒ Object
- #put_request(resource, data, signature_keys, url) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Sender
Returns a new instance of Sender.
10 11 12 |
# File 'lib/little/sender.rb', line 10 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#delete_request(resource, data, signature_keys, url) ⇒ Object
18 19 20 |
# File 'lib/little/sender.rb', line 18 def delete_request(resource, data, signature_keys, url) query_request(:delete, resource, data, signature_keys, url) end |
#get_request(resource, data, signature_keys, url) ⇒ Object
14 15 16 |
# File 'lib/little/sender.rb', line 14 def get_request(resource, data, signature_keys, url) query_request(:get, resource, data, signature_keys, url) end |
#post_request(resource, data, signature_keys, url) ⇒ Object
22 23 24 |
# File 'lib/little/sender.rb', line 22 def post_request(resource, data, signature_keys, url) form_request(:post, resource, data, signature_keys, url) end |
#put_request(resource, data, signature_keys, url) ⇒ Object
26 27 28 |
# File 'lib/little/sender.rb', line 26 def put_request(resource, data, signature_keys, url) form_request(:put, resource, data, signature_keys, url) end |