房间相关接口文档
修改房间内昵称
接口地址
权限需求
POST请求的Body请求参数
{
"nickname": "测试昵称",
"room_id": "3587810143523774464",
"to_user_id": 8828375
}
参数名 | 类型 | 必须 | 说明 |
---|---|---|---|
nickname | string | true | 用于设定或清空修改目标在房间内的昵称。若不传入该参数值,则会清空昵称。此昵称长度最长为 20 个字符。 |
room_id | string | true | 用于指定特定的房间 ID,以确定在哪个房间内进行昵称修改操作。 |
to_user_id | int64 | true | 代表修改目标的用户 ID。若该 ID 与当前操作者自身 ID 相同,则表示修改自己在房间内的昵称。 |
返回结果
{
"msg": "",
"result": {},
"status": "ok"
}
{
"msg": "权限不足",
"result": {},
"status": "failed"
}
获取加入的房间列表
接口地址
权限需求
Get请求的Query请求参数
参数名 | 类型 | 说明 |
---|---|---|
offset | int | 表示跳过的房间数量,用于分页查询时确定起始位置 |
limit | int | 限制返回结果的数量,其最大值为 50,用于控制数据获取量 |
返回结果
{
"msg": "",
"result": {
"rooms": [
{
"room_id": "372850461859040xxxx",
"room_name": "测试2",
"room_avatar": "https://imgheybox.max-c.com/dev/bbs/2024/12/05/e380b1a5f190784c252ec3696fa33fd3.png",
"create_by": 100001,
"room_pic": "",
"is_public": 0,
"public_id": "",
"is_hot": 0,
"join_time": 1733388149129
}
],
"total": 84,
"offset": 0,
"limit": 50
},
"status": "ok"
}
参数名 | 类型 | 说明 |
---|---|---|
room_id | string | 房间的唯一ID |
room_name | string | 房间的名称 |
room_avatar | string | 房间左上角以及目录中的小尺寸图片路径 |
room_pic | string | 房间左上角的大尺寸图片路径 |
create_by | int64 | 创建该房间的用户ID |
is_public | int | 表示房间的公开状态,取值为 1 时表示房间公开,其他用户可使用public_id自由访问;取值为 0 时表示房间非公开 |
public_id | string | 当房间公开时生成的特定 ID,可供其他用户凭借此 ID 加入该房间 |
is_hot | int | 表明房间是否为热门房间,取值为 1 时为热门房间,会在首页热门列表中展示;取值为 0 时则不是热门房间 |
join_time | int64 | 用户加入房间的时间,以毫秒为单位的时间戳形式 |
退出房间
接口地址
权限需求
POST请求的Body请求参数
{
"room_id": "3587810143523774464"
}
参数名 | 类型 | 必须 | 说明 |
---|---|---|---|
room_id | string | true | 用于指定特定的房间 ID,以确定在哪个房间内进行退出操作。 |
返回结果
{
"msg": "",
"result": {},
"status": "ok"
}
房间踢人
接口地址
权限需求
POST请求的Body请求参数
{
"room_id": "3587810143523774464",
"to_user_id": 8828375
}
参数名 | 类型 | 必须 | 说明 |
---|---|---|---|
room_id | string | true | 用于指定特定的房间 ID,以确定在哪个房间内进行踢人操作。 |
to_user_id | int64 | true | 代表踢人目标的用户 ID。 |
返回结果
{
"msg": "",
"result": {},
"status": "ok"
}
{
"msg": "权限不足",
"result": {},
"status": "failed"
}
修改于 2024-12-23 02:02:22