Class: Keymaker::BatchGetNodesRequest
- Inherits:
-
Request
- Object
- Request
- Keymaker::BatchGetNodesRequest
show all
- Defined in:
- lib/keymaker/batch_get_nodes_request.rb
Instance Attribute Summary
Attributes inherited from Request
#config, #opts, #service
Instance Method Summary
collapse
Methods inherited from Request
#initialize
Instance Method Details
#batch_get_nodes_properties ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/keymaker/batch_get_nodes_request.rb', line 9
def batch_get_nodes_properties
[].tap do |batch_request|
opts.each_with_index do |node_id, request_id|
batch_request << {id: request_id, to: node_uri(node_id), method: "GET"}
end
end
end
|
#submit ⇒ Object
5
6
7
|
# File 'lib/keymaker/batch_get_nodes_request.rb', line 5
def submit
service.post(batch_path, batch_get_nodes_properties)
end
|