Class: PacklinkLite::Client
- Inherits:
-
Object
- Object
- PacklinkLite::Client
- Defined in:
- lib/packlink_lite/client.rb
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
- #get(path, params = nil, options = {}) ⇒ Object
- #post(path, payload, options = {}) ⇒ Object
Instance Method Details
#delete(path, options = {}) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/packlink_lite/client.rb', line 20 def delete(path, = {}) with_error_handling do response = connection([:api_key]).delete(path) response.body end end |
#get(path, params = nil, options = {}) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/packlink_lite/client.rb', line 6 def get(path, params = nil, = {}) with_error_handling do response = connection([:api_key]).get(path, params) response.body end end |
#post(path, payload, options = {}) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/packlink_lite/client.rb', line 13 def post(path, payload, = {}) with_error_handling do response = connection([:api_key]).post(path, payload) response.body end end |