Class: Modgen::API::APIRequest
- Defined in:
- lib/modgen/api/api_request.rb
Instance Attribute Summary collapse
-
#api_method ⇒ Object
readonly
Returns the value of attribute api_method.
Attributes inherited from Request
#data, #http_method, #origin_url, #url
Instance Method Summary collapse
-
#initialize(api_method, data) ⇒ APIRequest
constructor
Create APIRequest.
Methods inherited from Request
Constructor Details
#initialize(api_method, data) ⇒ APIRequest
Create APIRequest
Parameters:
- api_method
-
Modgen::API::Method
- data
-
Hash
{ 'path' => {}, 'params' => {}, 'body' => {} }
19 20 21 22 23 |
# File 'lib/modgen/api/api_request.rb', line 19 def initialize(api_method, data) @api_method = api_method super(@api_method.url, data, @api_method.http_method.downcase) end |
Instance Attribute Details
#api_method ⇒ Object (readonly)
Returns the value of attribute api_method.
5 6 7 |
# File 'lib/modgen/api/api_request.rb', line 5 def api_method @api_method end |