Appearance
获取直播间观看数据
请求路径
- 请求方式:
POST
- 请求头:
Content-Type:application/json
- 接口地址:
https://gateway.nuoyunapi.com/Api/RoomRounds/getRoomUserDurationList/2.0.0
- 频率限制:
10秒30次
请求参数
参数 | 必选 | 类型 | 描述 |
---|---|---|---|
room_id | 是 | integer | 直播间ID |
page | 是 | integer | 第几页(最小值1) |
page_size | 是 | integer | 一页显示多少(最小值为1,最大值500) |
room_rounds_id | 是 | integer | 场次ID(传0时,获取全部直播数据) |
请求示例
json
{
"room_id": 1000001,
"page": 1,
"page_size": 10,
"room_rounds_id": 1001
}
响应参数
参数 | 必选 | 类型 | 描述 |
---|---|---|---|
code | 是 | integer | 状态码:200-成功,400-失败 |
msg | 是 | string | 提示信息 |
data | 是 | object | 观看数据 |
data
参数结构
参数 | 必选 | 类型 | 描述 |
---|---|---|---|
total | 是 | integer | 用户总数 |
list | 是 | array | 用户观看时长列表 |
list
参数结构
参数 | 必选 | 类型 | 描述 |
---|---|---|---|
wechat_user_space_id | 是 | integer | 用户ID |
wechat_user_name | 是 | string | 用户昵称 |
wechat_user_photo | 是 | string | 用户头像 |
first_time | 是 | string | 初次访问时间 |
last_time | 是 | string | 最近访问时间 |
stay_duration | 是 | integer | 在线时长(秒) |
ip | 是 | string | 最近访问IP |
third_uuid | 是 | string | 三方系统用户ID |
third_wechat_info | 是 | object | 第三方微信信息 |
live_duration | 是 | integer | 直播时长(秒) |
playback_duration | 是 | integer | 回放时长(秒) |
third_wechat_info
参数结构
参数 | 必选 | 类型 | 描述 |
---|---|---|---|
authorizer_appid | 是 | string | 第三方公众号appid |
openid | 是 | string | 第三方openid |
unionid | 是 | string | 第三方unionid |
响应示例
json
{
"code": 200,
"data": {
"total": 2,
"list": [
{
"wechat_user_space_id": 1001,
"wechat_user_name": "用户001",
"wechat_user_photo": "https://example.com/avatar/001.jpg",
"first_time": "2025-06-23 09:11:34",
"last_time": "2025-07-01 14:56:14",
"stay_duration": 180,
"ip": "192.168.1.100",
"third_uuid": "uuid_001",
"third_wechat_info": {
"authorizer_appid": "wx1234567890abcdef",
"openid": "openid_example_001",
"unionid": "unionid_example_001"
},
"live_duration": 180,
"playback_duration": 180
},
{
"wechat_user_space_id": 1002,
"wechat_user_name": "用户002",
"wechat_user_photo": "https://example.com/avatar/002.jpg",
"first_time": "2025-06-23 11:53:35",
"last_time": "2025-06-30 15:04:42",
"stay_duration": 60,
"ip": "192.168.1.101",
"third_uuid": "",
"third_wechat_info": {
"authorizer_appid": "",
"openid": "",
"unionid": ""
},
"live_duration": 100,
"playback_duration": 100
}
]
},
"msg": "Success"
}