1、给部分账号提供设置重点直播列表,仅开通功能的账号可以使用
2、接口支持https协议
http://api.polyv.net/live/v4/channel/ccb/focus/reset
http://api.polyv.net/live/v4/channel/ccb/focus/reset?appId=ff0outsa15&sign=A6FF5B958C2D5103FB4A93334091ED93&channelIds=2731380%2C2750506%2C2737621%2C365032×tamp=1642648261357
@Test
public void testCCBFocusChannel() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String channelId = "2731380,2750506,2737621,365032";
String url = "http://api.polyv.net/live/v4/channel/ccb/focus/reset";
//http 调用逻辑
Map<String,String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp",timestamp);
requestMap.put("channelIds", channelId);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = MapUtil.appendUrl(url,requestMap);
String response = HttpUtil.postFormBody(url, null);
log.info("测试清空频道聊天记录接口返回值:{}",response);
}
{
"code": 200,
"status": "success",
"requestId": "70fdf8c9808a4a799ffbdc3073630e3f.83.16426482643007221",
"data": null,
"success": true
}
{
"code": 400,
"status": "error",
"requestId": "4081dbac03e6441e8bdd301d8feee5a2.124.16360831818611581",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}