Class: Knowtify::Request
- Inherits:
-
Object
- Object
- Knowtify::Request
- Defined in:
- lib/knowtify/request.rb
Overview
A generic request object to be passed to handlers
Instance Attribute Summary collapse
-
#api_key ⇒ Object
API key for request; defaults to config.api_key.
-
#http_request_options ⇒ Object
API key for request; defaults to config.api_key.
-
#params ⇒ Object
API key for request; defaults to config.api_key.
-
#path ⇒ Object
API key for request; defaults to config.api_key.
Instance Method Summary collapse
- #config ⇒ Object
- #headers ⇒ Object
-
#initialize(options = {}) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(options = {}) ⇒ Request
Returns a new instance of Request.
9 10 11 12 13 14 |
# File 'lib/knowtify/request.rb', line 9 def initialize(={}) @api_key = [:api_key] || config.api_key @path = [:path] @params = [:params] @http_request_options = [:http_request_options] || {} end |
Instance Attribute Details
#api_key ⇒ Object
API key for request; defaults to config.api_key
4 5 6 |
# File 'lib/knowtify/request.rb', line 4 def api_key @api_key end |
#http_request_options ⇒ Object
API key for request; defaults to config.api_key
4 5 6 |
# File 'lib/knowtify/request.rb', line 4 def @http_request_options end |
#params ⇒ Object
API key for request; defaults to config.api_key
4 5 6 |
# File 'lib/knowtify/request.rb', line 4 def params @params end |
#path ⇒ Object
API key for request; defaults to config.api_key
4 5 6 |
# File 'lib/knowtify/request.rb', line 4 def path @path end |