Module: Slack::Web::Api::Endpoints::Dnd
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/dnd.rb
Instance Method Summary collapse
-
#dnd_endDnd(options = {}) ⇒ Object
Ends the current user’s Do Not Disturb session immediately.
-
#dnd_endSnooze(options = {}) ⇒ Object
Ends the current user’s snooze mode immediately.
-
#dnd_info(options = {}) ⇒ Object
Retrieves a user’s current Do Not Disturb status.
-
#dnd_setSnooze(options = {}) ⇒ Object
Turns on Do Not Disturb mode for the current user, or changes its duration.
-
#dnd_teamInfo(options = {}) ⇒ Object
Retrieves the Do Not Disturb status for users on a team.
Instance Method Details
#dnd_endDnd(options = {}) ⇒ Object
Ends the current user’s Do Not Disturb session immediately.
13 14 15 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 13 def dnd_endDnd( = {}) post('dnd.endDnd', ) end |
#dnd_endSnooze(options = {}) ⇒ Object
Ends the current user’s snooze mode immediately.
22 23 24 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 22 def dnd_endSnooze( = {}) post('dnd.endSnooze', ) end |
#dnd_info(options = {}) ⇒ Object
Retrieves a user’s current Do Not Disturb status.
33 34 35 36 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 33 def dnd_info( = {}) = .merge(user: users_id()['user']['id']) if [:user] post('dnd.info', ) end |
#dnd_setSnooze(options = {}) ⇒ Object
Turns on Do Not Disturb mode for the current user, or changes its duration.
45 46 47 48 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 45 def dnd_setSnooze( = {}) throw ArgumentError.new('Required arguments :num_minutes missing') if [:num_minutes].nil? post('dnd.setSnooze', ) end |
#dnd_teamInfo(options = {}) ⇒ Object
Retrieves the Do Not Disturb status for users on a team.
57 58 59 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 57 def dnd_teamInfo( = {}) post('dnd.teamInfo', ) end |