Module: Slack::Endpoint::Dnd
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/dnd.rb
Instance Method Summary collapse
-
#dnd_endDnd(options = {}) ⇒ Object
Ends the user’s currently scheduled Do Not Disturb session immediately.
-
#dnd_endSnooze(options = {}) ⇒ Object
Ends the current user’s snooze mode immediately.
-
#dnd_info(options = {}) ⇒ Object
Provides information about a user’s current Do Not Disturb settings.
-
#dnd_setSnooze(options = {}) ⇒ Object
Adjusts the snooze duration for a user’s Do Not Disturb settings.
-
#dnd_teamInfo(options = {}) ⇒ Object
Provides information about the current Do Not Disturb settings for users of a Slack team.
Instance Method Details
#dnd_endDnd(options = {}) ⇒ Object
Ends the user’s currently scheduled Do Not Disturb session immediately.
12 13 14 15 |
# File 'lib/slack/endpoint/dnd.rb', line 12 def dnd_endDnd(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("dnd.endDnd", ) end |
#dnd_endSnooze(options = {}) ⇒ Object
Ends the current user’s snooze mode immediately.
23 24 25 26 |
# File 'lib/slack/endpoint/dnd.rb', line 23 def dnd_endSnooze(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("dnd.endSnooze", ) end |
#dnd_info(options = {}) ⇒ Object
Provides information about a user’s current Do Not Disturb settings.
36 37 38 39 |
# File 'lib/slack/endpoint/dnd.rb', line 36 def dnd_info(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("dnd.info", ) end |
#dnd_setSnooze(options = {}) ⇒ Object
Adjusts the snooze duration for a user’s Do Not Disturb settings. If a snooze session is not already active for the user, invoking this method will begin one for the specified duration.
49 50 51 52 53 |
# File 'lib/slack/endpoint/dnd.rb', line 49 def dnd_setSnooze(={}) throw ArgumentError.new("Required arguments :num_minutes missing") if [:num_minutes].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("dnd.setSnooze", ) end |
#dnd_teamInfo(options = {}) ⇒ Object
Provides information about the current Do Not Disturb settings for users of a Slack team.
63 64 65 66 |
# File 'lib/slack/endpoint/dnd.rb', line 63 def dnd_teamInfo(={}) [:attachments] = [:attachments].to_json if Hash === [:attachments] post("dnd.teamInfo", ) end |