Class: Orchestrate::API::Request
- Inherits:
-
Object
- Object
- Orchestrate::API::Request
- Defined in:
- lib/orchestrate_api/request.rb
Overview
Uses HTTParty to make the HTTP calls,
and returns a Response object.
Instance Attribute Summary collapse
-
#data ⇒ Object
The json document for creating or updating a key.
-
#method ⇒ Object
The HTTP method - must be one of: [ :get, :put, :delete ].
-
#ref ⇒ Object
The ref value associated with a key.
-
#url ⇒ Object
The url for the HTTP request.
-
#user ⇒ Object
The api key for HTTP Basic Authentication over SSL.
-
#verbose ⇒ Object
Boolean.
Instance Method Summary collapse
-
#initialize(method, url, user) {|_self| ... } ⇒ Request
constructor
Sets the universal attributes from the params; any additional attributes are set from the block.
-
#perform ⇒ Object
Sends the HTTP request and returns a Response object.
Constructor Details
#initialize(method, url, user) {|_self| ... } ⇒ Request
Sets the universal attributes from the params; any additional attributes are set from the block.
31 32 33 34 35 |
# File 'lib/orchestrate_api/request.rb', line 31 def initialize(method, url, user) @method, @url, @user = method, url, user @data = {} yield self if block_given? end |
Instance Attribute Details
#data ⇒ Object
The json document for creating or updating a key.
20 21 22 |
# File 'lib/orchestrate_api/request.rb', line 20 def data @data end |
#method ⇒ Object
The HTTP method - must be one of: [ :get, :put, :delete ].
11 12 13 |
# File 'lib/orchestrate_api/request.rb', line 11 def method @method end |
#ref ⇒ Object
The ref value associated with a key.
23 24 25 |
# File 'lib/orchestrate_api/request.rb', line 23 def ref @ref end |
#url ⇒ Object
The url for the HTTP request.
14 15 16 |
# File 'lib/orchestrate_api/request.rb', line 14 def url @url end |
#user ⇒ Object
The api key for HTTP Basic Authentication over SSL.
17 18 19 |
# File 'lib/orchestrate_api/request.rb', line 17 def user @user end |
#verbose ⇒ Object
Boolean
26 27 28 |
# File 'lib/orchestrate_api/request.rb', line 26 def verbose @verbose end |