Class: HookSniff::BackgroundTask
- Inherits:
-
Object
- Object
- HookSniff::BackgroundTask
- Defined in:
- lib/hooksniff/api/background_task.rb
Instance Method Summary collapse
- #cancel(id) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(client) ⇒ BackgroundTask
constructor
A new instance of BackgroundTask.
- #list(params = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ BackgroundTask
Returns a new instance of BackgroundTask.
5 6 7 |
# File 'lib/hooksniff/api/background_task.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#cancel(id) ⇒ Object
17 18 19 |
# File 'lib/hooksniff/api/background_task.rb', line 17 def cancel(id) @client.execute_request("PUT", "/v1/background-tasks/#{id}") end |
#get(id) ⇒ Object
13 14 15 |
# File 'lib/hooksniff/api/background_task.rb', line 13 def get(id) @client.execute_request("GET", "/v1/background-tasks/#{id}") end |
#list(params = {}) ⇒ Object
9 10 11 |
# File 'lib/hooksniff/api/background_task.rb', line 9 def list(params = {}) @client.execute_request("GET", "/v1/background-tasks", query_params: params) end |