Room

Create Room

public createRoom(properties: RoomCreateOptions = {}): Promise<string>

Input params:RoomCreateOptions

Name
Type
Description
Required

name

string

room name

true

topic

string

room topic

false

invite

string array

array of user ids to invite

false

Output params:

Name
Type
Description
Required

roomId

string

id of the new room

true

Invite User

public inviteUser(userId, roomId)

Input params:

Name
Type
Description
Required

roomId

string

room id

true

userId

string

user id

true

Output params: N/A

Revoke invitation

public revoke(userId, roomId)

Input params:

Name
Type
Description
Required

roomId

string

room id

true

userId

string

user id

true

Output params: N/A

Kick User

public kickUser(userId, roomId, reason = null)

Input params:

Name
Type
Description
Required

roomId

string

room id

true

userId

string

user id

true

reason

string

invite reason

false

Output params: N/A

Join Room

public joinRoom(roomId: string): Promise<string>

Input params:

Name
Type
Description
Required

roomId

string

room id

true

Output params: N/A

Leave Room

public leaveRoom(roomId: string, reason?: string)

Input params:

Name
Type
Description
Required

roomId

string

room id

true

reason

string

leave reason

false

Output params: N/A

Get Room Memebers

 public getAllRoomMembers(roomId: string, atToken?: string): Promise<MembershipEvent[]>

Input params:

Name
Type
Description
Required

roomId

string

room id

true

atToken

string

optional batch token, null for "now"

true

Output params:

Name
Type
Description
Required

MembershipEvent[]

array of MembershipEvent

membership event data

true

Last updated