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 up to 50 users on a team.
Instance Method Details
#dnd_endDnd(options = {}) ⇒ Object
Ends the current user’s Do Not Disturb session immediately.
14 15 16 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 14 def dnd_endDnd( = {}) post('dnd.endDnd', ) end |
#dnd_endSnooze(options = {}) ⇒ Object
Ends the current user’s snooze mode immediately.
23 24 25 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 23 def dnd_endSnooze( = {}) post('dnd.endSnooze', ) end |
#dnd_info(options = {}) ⇒ Object
Retrieves a user’s current Do Not Disturb status.
36 37 38 39 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 36 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.
48 49 50 51 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 48 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 up to 50 users on a team.
62 63 64 65 |
# File 'lib/slack/web/api/endpoints/dnd.rb', line 62 def dnd_teamInfo( = {}) throw ArgumentError.new('Required arguments :users missing') if [:users].nil? post('dnd.teamInfo', ) end |