Module: SemaphoreApi::Client::WebHooks

Included in:
SemaphoreApi::Client
Defined in:
lib/semaphore_api/client/webhooks.rb

Instance Method Summary collapse

Instance Method Details

#create_webhook(project_hash_id, options = {}) ⇒ Object



9
10
11
# File 'lib/semaphore_api/client/webhooks.rb', line 9

def create_webhook(project_hash_id, options = {})
  post "/projects/#{project_hash_id}/hooks", options
end

#delete_webhook(project_hash_id, webhook_id, options = {}) ⇒ Object



17
18
19
# File 'lib/semaphore_api/client/webhooks.rb', line 17

def delete_webhook(project_hash_id, webhook_id, options = {})
  delete "/projects/#{project_hash_id}/hooks/#{webhook_id}", options
end

#edit_webhook(project_hash_id, webhook_id, options = {}) ⇒ Object



13
14
15
# File 'lib/semaphore_api/client/webhooks.rb', line 13

def edit_webhook(project_hash_id, webhook_id, options = {})
  put "/projects/#{project_hash_id}/hooks/#{webhook_id}", options
end

#webhooks(project_hash_id, options = {}) ⇒ Object



5
6
7
# File 'lib/semaphore_api/client/webhooks.rb', line 5

def webhooks(project_hash_id, options = {})
  get "/projects/#{project_hash_id}/hooks"
end