提交工单
咨询集成、功能及报价等问题
Gets the list of all chat rooms from the GoChat backend service.
Rate limit: 10 requests / second.
POST
/chat_room/get_room_list
application/json
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
uid | Int32 | Yes | 171171717 | User ID. |
count | Int32 | Yes | 10 | Number of entries per page. |
begin_timestamp | Int64 | No | 0 | Start time, a Unix timestamp in milliseconds. When 0 is specified, it returns x number of recently created rooms, where x is the value of the parameter count . |
{
"uid":171171717,
"room_id":"123456",
"room_type": 2
}
Parameter | Type | Example | Description |
---|---|---|---|
room_list | Object | - | Room list. |
The data structure of room_list
is as follows:
Parameter | Type | Example | Description |
---|---|---|---|
room_list.room_id | String | "200113279" | Room ID. |
room_list.subject | String | "I love this game" | Room subject. |
room_list.create_time | Int64 | 1608186550647 | Room creation time, in milliseconds. |
room_list.creator_name | Int32 | "Shawn" | Name of the room creator. |
room_list.creator_id | String | "1608186550647" | User ID of the room creator. |
room_list.online_count | Int32 | 2 | Number of members currently in the room. |
room_list.on_stage_count | Int32 | 2 | Number of room members participating in the chat. |
{
"ret": {
"code": 0,
"message": "succeed"
},
"data": {
"room_list": [
{
"room_id": "200113279",
"subject": "I love this game",
"create_time": 1608186550647,
"creator_name": "shawn",
"creator_id": 1608186550647,
"online_count": 1,
"on_stage_count": 1
}
]
}
}
Return code | Description |
---|---|
80012 | The user is offline. |