Room
iOS Room APIs
Create a room
Input Parameters:
Name | Type | Description | Required |
---|---|---|---|
name | NSString | the room name | false |
visibility | NSString | the visibility of the room | false |
roomAlias | NSString | the room alias on the node the room will be created | false |
topic | NSString | the room topic | false |
Output Parameters:
MXCreateRoomResponse
Name | Type | Description | Required |
---|---|---|---|
roomId | NSString | The allocated room id | true |
Create a room with parameters
Input Parameters:
Name | Type | Description | Required |
---|---|---|---|
parameters | NSString | MXRoomCreationParameters | true |
Output Parameters:
MXCreateRoomResponse
Name | Type | Description | Required |
---|---|---|---|
roomId | NSString | The allocated room id | true |
Join a chat room
Parameters:
Name | Type | Description | Required |
---|---|---|---|
| string | room id | true |
Invite user to the room
Parameters:
Name | Type | Description | Required |
---|---|---|---|
| string | room id | true |
| string | user id | true |
Leave the room
Parameters:
Name | Type | Description | Required |
---|---|---|---|
| string | room id | true |
Remove a user from the room
Parameters:
Name | Type | Description | Required |
---|---|---|---|
| string | room id | true |
| String | user id | true |
| String | reason string | true |
Modify room name
Parameters:
Name | Type | Description | Required |
---|---|---|---|
| string | room id | true |
| string | new room name | true |
Get room name
Parameters:
Name | Type | Description | Required |
---|---|---|---|
| string | room id | true |
Ban User from a room
Input Parameters:
Name | Type | Description | Required |
---|---|---|---|
userId | NSString | user id | true |
roomId | NSString | room id | true |
reason | NSString | reason of banning the user | false |
Output Parameters:
Name | Type | Description | Required |
---|---|---|---|
success | block | A block object called when the operation succeeds | true |
failure | block | A block object called when the operation fails. | true |
Unban user from a room
Input Parameters:
Name | Type | Description | Required |
---|---|---|---|
userId | NSString | user id | true |
roomId | NSString | room id | true |
Output Parameters:
Name | Type | Description | Required |
---|---|---|---|
success | block | A block object called when the operation succeeds | true |
failure | block | A block object called when the operation fails. | true |
The methods below are deprecated. Please avoid using them.
(Deprecated) Create a chat room
Parameters:
MXRoomCreationParameters
Name | Type | Description | Required |
---|---|---|---|
| string | type of login (the type of the above example is | true |
| string | updated time returned by the | true |
| json | login information | true |
| string | device id, not needed for new device | false |
Last updated