Class: Kentaa::Api::Request
- Inherits:
-
Object
- Object
- Kentaa::Api::Request
- Defined in:
- lib/kentaa/api/request.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #delete(path, params = {}, options = {}) ⇒ Object
- #get(path, params = {}, options = {}) ⇒ Object
-
#initialize(config) ⇒ Request
constructor
A new instance of Request.
- #patch(path, params = {}, body = {}, options = {}) ⇒ Object
- #post(path, params = {}, body = {}, options = {}) ⇒ Object
Constructor Details
#initialize(config) ⇒ Request
Returns a new instance of Request.
12 13 14 |
# File 'lib/kentaa/api/request.rb', line 12 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
10 11 12 |
# File 'lib/kentaa/api/request.rb', line 10 def config @config end |
Instance Method Details
#delete(path, params = {}, options = {}) ⇒ Object
28 29 30 |
# File 'lib/kentaa/api/request.rb', line 28 def delete(path, params = {}, = {}) request(:delete, path, params, nil, ) end |
#get(path, params = {}, options = {}) ⇒ Object
16 17 18 |
# File 'lib/kentaa/api/request.rb', line 16 def get(path, params = {}, = {}) request(:get, path, params, nil, ) end |
#patch(path, params = {}, body = {}, options = {}) ⇒ Object
24 25 26 |
# File 'lib/kentaa/api/request.rb', line 24 def patch(path, params = {}, body = {}, = {}) request(:patch, path, params, body, ) end |
#post(path, params = {}, body = {}, options = {}) ⇒ Object
20 21 22 |
# File 'lib/kentaa/api/request.rb', line 20 def post(path, params = {}, body = {}, = {}) request(:post, path, params, body, ) end |