Class: LabClient::SystemHooks
- Defined in:
- lib/labclient/system_hooks/add.rb,
lib/labclient/system_hooks/list.rb,
lib/labclient/system_hooks/test.rb,
lib/labclient/system_hooks/delete.rb
Overview
Specifics
Constant Summary
Constants included from AccessLevel
AccessLevel::HUMAN_ACCESS_LEVELS, AccessLevel::MACHINE_ACCESS_LEVELS
Instance Attribute Summary
Attributes inherited from Common
Instance Method Summary collapse
-
#add(query = {}) ⇒ Object
Add.
- #delete(system_hook_id) ⇒ Object
- #list ⇒ Object
- #test(system_hook_id) ⇒ Object
Methods inherited from Common
#api_methods, #api_methods_help, #format_id, #format_query_id, #format_query_ids, #format_time?, #group_name, #help, #initialize, #inspect, #klass, #protected_query_access_level, #query_access_level, #query_format_time
Methods included from Docs
#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title
Methods included from AccessLevel
#human_access_level, #human_protected_access_level, #machine_access_level, #machine_protected_access_level
Constructor Details
This class inherits a constructor from LabClient::Common
Instance Method Details
#add(query = {}) ⇒ Object
Add
29 30 31 |
# File 'lib/labclient/system_hooks/add.rb', line 29 def add(query = {}) client.request(:post, 'hooks', SystemHook, query) end |
#delete(system_hook_id) ⇒ Object
18 19 20 21 |
# File 'lib/labclient/system_hooks/delete.rb', line 18 def delete(system_hook_id) system_hook_id = format_id(system_hook_id) client.request(:delete, "hooks/#{system_hook_id}") end |
#list ⇒ Object
13 14 15 |
# File 'lib/labclient/system_hooks/list.rb', line 13 def list client.request(:get, 'hooks', SystemHook) end |
#test(system_hook_id) ⇒ Object
20 21 22 23 |
# File 'lib/labclient/system_hooks/test.rb', line 20 def test(system_hook_id) system_hook_id = format_id(system_hook_id) client.request(:get, "hooks/#{system_hook_id}") end |