Class: Tikkie::Api::Request
- Inherits:
-
Object
- Object
- Tikkie::Api::Request
- Defined in:
- lib/tikkie/api/request.rb
Overview
Make authenticated HTTP requests to the Tikkie API.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #delete(path, params = {}) ⇒ Object
- #get(path, params = {}) ⇒ Object
-
#initialize(config) ⇒ Request
constructor
A new instance of Request.
- #post(path, params = {}, body = {}) ⇒ Object
Constructor Details
#initialize(config) ⇒ Request
Returns a new instance of Request.
13 14 15 |
# File 'lib/tikkie/api/request.rb', line 13 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/tikkie/api/request.rb', line 11 def config @config end |
Instance Method Details
#delete(path, params = {}) ⇒ Object
25 26 27 |
# File 'lib/tikkie/api/request.rb', line 25 def delete(path, params = {}) request(:delete, path, params) end |
#get(path, params = {}) ⇒ Object
17 18 19 |
# File 'lib/tikkie/api/request.rb', line 17 def get(path, params = {}) request(:get, path, params) end |
#post(path, params = {}, body = {}) ⇒ Object
21 22 23 |
# File 'lib/tikkie/api/request.rb', line 21 def post(path, params = {}, body = {}) request(:post, path, params, body) end |