Module: Gitlab::Client::SystemHooks
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/system_hooks.rb
Overview
Defines methods related to system hooks.
Instance Method Summary collapse
-
#add_hook(url) ⇒ Gitlab::ObjectifiedHash
(also: #add_system_hook)
Adds a new system hook.
-
#delete_hook(id) ⇒ Gitlab::ObjectifiedHash
(also: #delete_system_hook)
Deletes a new system hook.
-
#hook(id) ⇒ Array<Gitlab::ObjectifiedHash>
(also: #system_hook)
Tests a system hook.
-
#hooks(options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
(also: #system_hooks)
Gets a list of system hooks.
Instance Method Details
#add_hook(url) ⇒ Gitlab::ObjectifiedHash Also known as: add_system_hook
Adds a new system hook.
27 28 29 |
# File 'lib/gitlab/client/system_hooks.rb', line 27 def add_hook(url) post("/hooks", :body => {:url => url}) end |
#delete_hook(id) ⇒ Gitlab::ObjectifiedHash Also known as: delete_system_hook
Deletes a new system hook.
53 54 55 |
# File 'lib/gitlab/client/system_hooks.rb', line 53 def delete_hook(id) delete("/hooks/#{id}") end |
#hook(id) ⇒ Array<Gitlab::ObjectifiedHash> Also known as: system_hook
Tests a system hook.
40 41 42 |
# File 'lib/gitlab/client/system_hooks.rb', line 40 def hook(id) get("/hooks/#{id}") end |
#hooks(options = {}) ⇒ Array<Gitlab::ObjectifiedHash> Also known as: system_hooks
Gets a list of system hooks.
14 15 16 |
# File 'lib/gitlab/client/system_hooks.rb', line 14 def hooks(={}) get("/hooks", query: ) end |