Class: LabClient::Notifications
- Defined in:
- lib/labclient/notifications/list.rb,
lib/labclient/notifications/update.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
- #list_global ⇒ Object (also: #list)
- #list_group(group_id) ⇒ Object
- #list_project(project_id) ⇒ Object
- #update_global(query) ⇒ Object (also: #update)
- #update_group(group_id, query) ⇒ Object
- #update_project(project_id, query) ⇒ 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
#list_global ⇒ Object Also known as: list
28 29 30 |
# File 'lib/labclient/notifications/list.rb', line 28 def list_global client.request(:get, 'notification_settings') end |
#list_group(group_id) ⇒ Object
39 40 41 42 |
# File 'lib/labclient/notifications/list.rb', line 39 def list_group(group_id) group_id = format_id(group_id) client.request(:get, "groups/#{group_id}/notification_settings") end |
#list_project(project_id) ⇒ Object
49 50 51 52 |
# File 'lib/labclient/notifications/list.rb', line 49 def list_project(project_id) project_id = format_id(project_id) client.request(:get, "projects/#{project_id}/notification_settings") end |
#update_global(query) ⇒ Object Also known as: update
13 14 15 |
# File 'lib/labclient/notifications/update.rb', line 13 def update_global(query) client.request(:put, 'notification_settings', nil, query) end |
#update_group(group_id, query) ⇒ Object
24 25 26 27 |
# File 'lib/labclient/notifications/update.rb', line 24 def update_group(group_id, query) group_id = format_id(group_id) client.request(:put, "groups/#{group_id}/notification_settings", nil, query) end |
#update_project(project_id, query) ⇒ Object
59 60 61 62 |
# File 'lib/labclient/notifications/update.rb', line 59 def update_project(project_id, query) project_id = format_id(project_id) client.request(:put, "projects/#{project_id}/notification_settings", nil, query) end |