Class: Morpheus::GuidanceInterface
- Inherits:
-
APIClient
- Object
- APIClient
- Morpheus::GuidanceInterface
- Defined in:
- lib/morpheus/api/guidance_interface.rb
Instance Method Summary collapse
- #base_path ⇒ Object
- #exec(id, params = {}) ⇒ Object
- #get(id, params = {}) ⇒ Object
- #ignore(id, params = {}) ⇒ Object
- #list(params = {}) ⇒ Object
- #stats ⇒ Object
- #types ⇒ Object
Instance Method Details
#base_path ⇒ Object
5 6 7 |
# File 'lib/morpheus/api/guidance_interface.rb', line 5 def base_path "/api/guidance" end |
#exec(id, params = {}) ⇒ Object
33 34 35 36 37 |
# File 'lib/morpheus/api/guidance_interface.rb', line 33 def exec(id, params={}) url = "#{base_path}/#{id}/execute" headers = { params: params, :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } execute(method: :put, url: url, headers: headers) end |
#get(id, params = {}) ⇒ Object
27 28 29 30 31 |
# File 'lib/morpheus/api/guidance_interface.rb', line 27 def get(id, params={}) url = "#{base_path}/#{id}" headers = { params: params, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end |
#ignore(id, params = {}) ⇒ Object
39 40 41 42 43 |
# File 'lib/morpheus/api/guidance_interface.rb', line 39 def ignore(id, params={}) url = "#{base_path}/#{id}/ignore" headers = { params: params, :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } execute(method: :put, url: url, headers: headers) end |
#list(params = {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/morpheus/api/guidance_interface.rb', line 9 def list(params={}) url = base_path headers = { params: params, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end |
#stats ⇒ Object
15 16 17 18 19 |
# File 'lib/morpheus/api/guidance_interface.rb', line 15 def stats() url = "#{base_path}/stats" headers = { params: {}, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end |
#types ⇒ Object
21 22 23 24 25 |
# File 'lib/morpheus/api/guidance_interface.rb', line 21 def types() url = "#{base_path}/types" headers = { params: {}, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end |