1、查询账号下频道聊天记录
2、接口支持https协议
http://api.polyv.net/live/v3/user/chat/get-speak-list
https://api.polyv.net/live/v3/user/chat/get-speak-list?cursor=6_2&size=3&appId=frlr1zazn3&sign=C63541E7ACE179314B087FB218925FBC&userId=1b448be323×tamp=1634284501527
/**
* 测试查询频道连麦详情数据
* @throws IOException
*/
@Test
public void test() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String userId = super.userId;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "https://api.polyv.net/live/v3/user/chat/get-speak-list";
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("userId",userId);
requestMap.put("cursor","6_2");
requestMap.put("size","3");
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("测试查询所有聊天记录,当前页查询成功,返回值:{}",response);
//do somethings
}
{
"code": 200,
"status": "success",
"message": "",
"data": {
"size": 3,
"cursor": "7_3",
"list": [
{
"id": "f14e71f0-0fb5-11ec-912a-f7bfa2a37ef8",
"roomId": "2523307",
"content": "1",
"user": "{\"banned\":false,\"channelId\":\"2523307\",\"clientIp\":\"175.10.232.110\",\"customize\":0,\"nick\":\"a\",\"pic\":\"https://liveimages.videocc.net/defaultImg/avatar/viewer.png\",\"roomId\":\"2523307\",\"uid\":\"nhycNjFyZxSXuVz0AKNW\",\"userId\":\"1631003162428\",\"userType\":\"slice\"}",
"image": "",
"time": 1631003465350,
"clientIP": "",
"msgType": null,
"userType": "slice",
"sessionId": null,
"quote": null,
"accountId": "1b448be323"
},
{
"id": "f202a6c0-0fb5-11ec-912a-f7bfa2a37ef8",
"roomId": "2523307",
"content": "2",
"user": "{\"banned\":false,\"channelId\":\"2523307\",\"clientIp\":\"175.10.232.110\",\"customize\":0,\"nick\":\"a\",\"pic\":\"https://liveimages.videocc.net/defaultImg/avatar/viewer.png\",\"roomId\":\"2523307\",\"uid\":\"nhycNjFyZxSXuVz0AKNW\",\"userId\":\"1631003162428\",\"userType\":\"slice\"}",
"image": "",
"time": 1631003466531,
"clientIP": "",
"msgType": null,
"userType": "slice",
"sessionId": null,
"quote": null,
"accountId": "1b448be323"
},
{
"id": "f39331d0-0fb5-11ec-912a-f7bfa2a37ef8",
"roomId": "2523307",
"content": "35",
"user": "{\"banned\":false,\"channelId\":\"2523307\",\"clientIp\":\"175.10.232.110\",\"customize\":0,\"nick\":\"a\",\"pic\":\"https://liveimages.videocc.net/defaultImg/avatar/viewer.png\",\"roomId\":\"2523307\",\"uid\":\"nhycNjFyZxSXuVz0AKNW\",\"userId\":\"1631003162428\",\"userType\":\"slice\"}",
"image": "",
"time": 1631003469156,
"clientIP": "",
"msgType": null,
"userType": "slice",
"sessionId": null,
"quote": null,
"accountId": "1b448be323"
}
]
}
}
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}