Class: Onering::API::AutomationJobs
- Inherits:
-
Onering::API
- Object
- Onering::API
- Onering::API::AutomationJobs
- Defined in:
- lib/onering/plugins/automation.rb
Overview
Constant Summary
Constants inherited from Onering::API
DEFAULT_BASE, DEFAULT_CLIENT_KEY, DEFAULT_CLIENT_PEM, DEFAULT_PATH, DEFAULT_VALIDATION_PEM
Constants included from Util
Instance Attribute Summary
Attributes inherited from Onering::API
Instance Method Summary collapse
- #list ⇒ Object
- #requests_waiting(name) ⇒ Object
- #run(name, options = {}, &block) ⇒ Object
- #show(name) ⇒ Object
Methods inherited from Onering::API
#_default_param, #_setup_auth, #_setup_auth_token, #connect, #delete, #get, #initialize, #method_missing, #post, #put, #request, #status
Methods included from Util
#fact, #gem_path, #http_status, #make_filter
Constructor Details
This class inherits a constructor from Onering::API
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Onering::API
Instance Method Details
#list ⇒ Object
36 37 38 |
# File 'lib/onering/plugins/automation.rb', line 36 def list() get("/automation/jobs/list").parsed_response end |
#requests_waiting(name) ⇒ Object
44 45 46 |
# File 'lib/onering/plugins/automation.rb', line 44 def requests_waiting(name) get("/automation/jobs/#{name}/waiting").parsed_response end |
#run(name, options = {}, &block) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/onering/plugins/automation.rb', line 48 def run(name, ={}, &block) if block_given? post("/automation/jobs/#{name}/run", { :query => }, &block).parsed_response else get("/automation/jobs/#{name}/run", { :query => }).parsed_response end end |
#show(name) ⇒ Object
40 41 42 |
# File 'lib/onering/plugins/automation.rb', line 40 def show(name) get("/automation/jobs/#{name}").parsed_response end |