Work with Do Not Disturb Mode
The following are Apex classes for the Slack dnd
API methods.
Sends a request to end the current user's Do Not Disturb session immediately.
Usage
See Slack’s dnd.endDnd method.
The following are methods for DndEndDndRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.DndEndDndRequest.Builder
Contains methods to build an instance of the Slack.DndEndDndRequest
class.
A Builder object is obtained by invoking one of the DndEndDndRequest.builder
methods defined by the DndEndDndRequest
class.
The following are methods for DndEndDndRequest.Builder
.
Required. Returns an instance of Slack.DndEndDndRequest
.
Signature
Return Value
Type: Slack.DndEndDndRequest
Ends the current user's Do Not Disturb session immediately.
Usage
See Slack’s dnd.endDnd method.
This class contains standard response methods.
Sends a request to end the current user's snooze mode immediately.
Usage
See Slack’s dnd.endSnooze method.
The following are methods for DndEndSnoozeRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.DndEndSnoozeRequest.Builder
Contains methods to build an instance of the Slack.DndEndSnoozeRequest
class.
A Builder object is obtained by invoking one of the DndEndSnoozeRequest.builder
methods defined by the DndEndSnoozeRequest
class.
The following are methods for DndEndSnoozeRequest.Builder
.
Required. Returns an instance of the Slack.DndEndSnoozeRequest
object.
Signature
Return Value
Type: Slack.DndEndSnoozeRequest
Ends the current user's snooze mode immediately.
Usage
See Slack’s dnd.endSnooze method.
This class contains standard response methods.
The following are methods for DndEndSnoozeResponse
.
Gets the timestamp for when the next Do Not Disturb session ends.
Signature
Return Value
Type: Integer
Gets the timestamp for when the next Do Not Disturb session starts.
Signature
Return Value
Type: Integer
Specifies whether the user’s Do Not Disturb mode is enabled.
Signature
Return Value
Type: Boolean
Specifies whether snooze is enabled.
Signature
Return Value
Type: Boolean
Sets whether Do Not Disturb mode is enabled .
Signature
Parameters
dndEnabled
Type: Boolean
Signature
Parameters
nextDndEndTs
Type: Integer
Return Value
Type: void
Signature
Parameters
nextDndStartTs
Type: Integer
Return Value
Type: void
Signature
Parameters
snoozeEnabled
Type: Boolean
Return Value
Type: void
Sends a request to retrieve a user’s current Do Not Disturb status.
Usage
See Slack’s dnd.info method.
The following are methods for DndInfoRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.DndInfoRequest.Builder
Contains methods to build an instance of the Slack.DndInfoRequest
class.
A Builder object is obtained by invoking one of the DndInfoRequest.builder
methods defined by the DndInfoRequest
class.
The following are methods for DndInfoRequest.Builder
. These methods are optional unless specified otherwise.
Required. Returns an instance of Slack.DndInfoRequest
.
Signature
Return Value
Type: Slack.DndInfoRequest
Signature
Parameters
user
Type: String
Return Value
Type: Slack.DndInfoRequest.Builder
Signature
Parameters
teamId
Type: String
Return Value
Type: Slack.DndInfoRequest.Builder
Retrieves a user’s current Do Not Disturb status.
Usage
See Slack’s dnd.info method.
This class contains standard response methods.
The following are methods for DndInfoResponse
.
Gets the timestamp for when the next Do Not Disturb session ends.
Signature
Return Value
Type: Integer
Gets the timestamp for when the next Do Not Disturb session starts.
Signature
Return Value
Type: Integer
Gets the timestamp for when the snooze ends.
Signature
Return Value
Type: Integer
Gets the remaining time for the snooze.
Signature
Return Value
Type: Integer
Specifies whether the user’s Do Not Disturb mode is enabled.
Signature
Return Value
Type: Boolean
Specifies whether snooze is enabled.
Signature
Return Value
Type: Boolean
Sets whether Do Not Disturb mode is enabled .
Signature
Parameters
dndEnabled
Type: Boolean
Signature
Parameters
nextDndEndTs
Type: Integer
Return Value
Type: void
Signature
Parameters
nextDndStartTs
Type: Integer
Return Value
Type: void
Signature
Parameters
snoozeEnabled
Type: Boolean
Return Value
Type: void
Signature
Parameters
snoozeEndtime
Type: Integer
Return Value
Type: void
Signature
Parameters
snoozeRemaining
Type: Integer
Return Value
Type: void
Sends a request to turn on Do Not Disturb mode for the current user, or to change its duration.
Usage
See Slack’s dnd.setSnooze method.
The following are methods for DndSetSnoozeRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.DndSetSnoozeRequest.Builder
Contains methods to build an instance of the Slack.DndSetSnoozeRequest
class.
A Builder object is obtained by invoking one of the DndSetSnoozeRequest.builder
methods defined by the DndSetSnoozeRequest
class.
The following are methods for DndSetSnoozeRequest.Builder
. These methods are optional unless specified otherwise.
Required. Builds an instance of Slack.DndSetSnoozeRequest
.
Signature
Return Value
Type: Slack.DndSetSnoozeRequest
Signature
Parameters
numMinutes
Type: Integer
Return Value
Type: Slack.DndSetSnoozeRequest.Builder
Turns on Do Not Disturb mode for the current user, or changes its duration.
Usage
See Slack’s dnd.setSnooze method
This class contains standard response methods.
The following are methods for DndSetSnoozeResponse
.
Gets the timestamp for when the snooze ends.
Signature
Return Value
Type: Integer
Gets the remaining time for the snooze.
Signature
Return Value
Type: Integer
Specifies whether snooze is enabled.
Signature
Return Value
Type: Boolean
Sets whether the user’s Do Not Disturb mode is enabled.
Signature
Parameters
snoozeEnabled
Type: Boolean
Return Value
Type: void
Sets when the user’s Do Not Disturb mode ends.
Signature
Parameters
snoozeEndtime
Type: Integer
Return Value
Type: void
Sets how long more the Do Not Disturb mode lasts.
Signature
Parameters
snoozeRemaining
Type: Integer
Return Value
Type: void
Sends a request to retrieve the Do Not Disturb status for up to 50 users on a team.
Usage
See Slack’s dnd.teamInfo method.
The following are methods for DndTeamInfoRequest
.
Builds a request object that's used when executing the API call.
Signature
Return Value
Type: Slack.DndTeamInfoRequest.Builder
Contains methods to build an instance of the Slack.DndTeamInfoRequest
class.
A Builder object is obtained by invoking one of the DndTeamInfoRequest.builder
methods defined by the DndTeamInfoRequest
class.
The following are methods for DndTeamInfoRequest.Builder
.
Required. Builds an instance of Slack.DndTeamInfoRequest
.
Signature
Return Value
Type: Slack.DndTeamInfoRequest
Signature
Parameters
teamId
Type: String
Return Value
Type: Slack.DndTeamInfoRequest.Builder
Required. The comma-separated list of users to fetch Do Not Disturb status for.
Signature
Parameters
users
Type: List<String>
Return Value
Type: Slack.DndTeamInfoRequest.Builder
Retrieves the Do Not Disturb status for up to 50 users on a team.
Usage
See Slack’s dnd.teamInfo method.
This class contains standard response methods.
The following are methods for DndTeamInfoResponse
.
Signature
Return Value
Type: Map<String,Slack.DndTeamInfoResponse.DndTeamMemberInfo>
Signature
Parameters
users
Type: Map<String,Slack.DndTeamInfoResponse.DndTeamMemberInfo>
Return Value
Type: void
Contains methods to build an instance of the Slack.DndTeamInfoResponse
class.
A DndTeamMemberInfo object is obtained by invoking one of the DndTeamInfoResponse.DndTeamMemberInfo
methods defined by the DndTeamInfoResponse
class.
The following are methods for DndTeamInfoResponse.DndTeamMemberInfo
.
Signature
Return Value
Type: Integer
Signature
Return Value
Type: Integer
Signature
Return Value
Type: Boolean
Signature
Parameters
dndEnabled
Type: Boolean
Return Value
Type: void