Class: Onering::API::AutomationRequests

Inherits:
Onering::API show all
Defined in:
lib/onering/plugins/automation.rb

Constant Summary

Constants inherited from Onering::API

DEFAULT_BASE, DEFAULT_CLIENT_KEY, DEFAULT_CLIENT_PEM, DEFAULT_PATH, DEFAULT_VALIDATION_PEM

Constants included from Util

Util::HTTP_STATUS_CODES

Instance Attribute Summary

Attributes inherited from Onering::API

#url

Instance Method Summary collapse

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

#find_by_status(status) ⇒ Object



8
9
10
# File 'lib/onering/plugins/automation.rb', line 8

def find_by_status(status)
  get("/automation/requests/status/#{status}").parsed_response
end

#flush_queueObject



20
21
22
# File 'lib/onering/plugins/automation.rb', line 20

def flush_queue()
  get("/automation/requests/flush").parsed_response
end

#purgeObject



24
25
26
# File 'lib/onering/plugins/automation.rb', line 24

def purge()
  get("/automation/requests/purge").parsed_response
end

#requeue(id) ⇒ Object



16
17
18
# File 'lib/onering/plugins/automation.rb', line 16

def requeue(id)
  get("/automation/requests/#{id}/requeue").parsed_response
end

#requeue_all_failedObject



28
29
30
# File 'lib/onering/plugins/automation.rb', line 28

def requeue_all_failed()
  get("/automation/requests/requeue").parsed_response
end

#show(id) ⇒ Object



12
13
14
# File 'lib/onering/plugins/automation.rb', line 12

def show(id)
  get("/automation/requests/#{id}").parsed_response
end

#summary(fields) ⇒ Object



4
5
6
# File 'lib/onering/plugins/automation.rb', line 4

def summary(fields)
  get("/automation/requests/summary/#{[*fields].join('/')}").parsed_response
end