The constructor of the ThreeDDiceAPI
class
Optional
apiKey: stringThe API key used to communicate with the server
Optional
appName: stringOptional string to identify the application which is communicating with the API
Optional
roomRoom Slug
Optional
userUUID of the connected user
API DiceBox Actions
List the themes in a user's dicebox
List the themes in a user's dicebox
Optional
filter: stringAPI Roll Actions
Create a new roll
Create a new roll
Optional
options: Partial<IDiceRollOptions>Get a roll by ID
Get a roll by ID
Update a roll
Update a roll
Bulk update rolls
Bulk update rolls
API Room Actions
List all created or joined rooms
List all created or joined rooms
Create a new room
Create a new room
Get a room by ID
Room slug
Passcode for access is the room is private
Get a room by ID
Room slug
Optional
passcode: stringPasscode for access is the room is private
Join a room
Room slug
Passcode for entry if the room is private
Join a room
Room slug
Optional
passcode: stringPasscode for entry if the room is private
Leave a room
Room slug
Participant ID
Leave a room
Room slug
Optional
participantId: stringParticipant ID
Update a participant
Room slug
Participant ID
Participant information
Update participant username
Update participant color. Example #FF0000
Update a participant
Room slug
Participant ID
Participant information
Update Room Rolls Automatically pickup dice from the board or unhide dice to players for all rolls in a room and for the current player.
Room slug
object to patch onto the dice in the room
set to true to clear all active dice in room
optional participant id of the dice to clear. Only room owner may clear dice they did not roll. supply '*' to clear all dice for all players, including you
Update Room Rolls Automatically pickup dice from the board or unhide dice to players for all rolls in a room and for the current player.
Room slug
object to patch onto the dice in the room
set to true to clear all active dice in room
Optional
participant: string | numberoptional participant id of the dice to clear. Only room owner may clear dice they did not roll. supply '*' to clear all dice for all players, including you
Update Room Update data about the room like room name
Room slug
object containing room data to patch
room name to change to
set to true to make room public, false to make private
passcode to use for a private room (is_public == false)
Update Room Update data about the room like room name
Room slug
object containing room data to patch
room name to change to
set to true to make room public, false to make private
passcode to use for a private room (is_public == false)
Clear roll history Update data about the room like room name
Room slug
Clear roll history Update data about the room like room name
Room slug
Update Room Background Update data about the room like room name
Room slug
File object (as created by a file input) containing the file to upload
Update Room Background Update data about the room like room name
Room slug
File object (as created by a file input) containing the file to upload
API Theme Actions
Get a theme by slug
Get a theme by slug
API User Actions
Get authorized user
Get authorized user
Create a Guest User Account
Create a Guest User Account
Connect to the live server and begin listening to room events.
Note: Your user must be a participant in a room in order to listen to events, otherwise an error is thrown.
Room slug to listen on
Optional
roomPasscode: stringPrivate passcode to access room
Optional
userUuid: stringPersonal User UUID to listen to whispers
Disconnect from the live server and stop listening to room events.
Listen for an event and execute a callback.
The event to listen on
The function to execute when the event is fired
Stop Listening for an event
The event to listen on
The function to execute when the event is fired
Execute a callback when the connection state changes.
The function to execute when the connection state changes
APIConnectError if the live connection has not been established
Execute a callback when the connection throws an error
The function to execute
APIRoomConnectError if the room connection has not been established
Execute a callback when a connection is established
The function to execute
APIRoomConnectError if the room connection has not been established
Execute a callback when a participant connection is established.
This is called once per-participant connection, excluding your own connection.
The function to execute
APIRoomConnectError if the room connection has not been established
Execute a callback when a participant connection is lost or disconnected
This is called once per-participant connection, excluding your own connection.
The function to execute
APIRoomConnectError if the room connection has not been established
Generated using TypeDoc
Used to communicate with the dddice API and live server. This is typically not initialized directly by a developer but created after calling ThreeDDice#connect.