https://api.polyv.net/live/v3/channel/basic/get-rebot-setting
1、接口用于查询频道虚拟人数设置信息
2、接口支持https
{
"code": 200,
"status": "success",
"message": "",
"data": {
"list": [
{
"channelId": 2180007,
"robotNumber": 6,
"addRobotModel": "timely",
"changeTime": 20000,
"leftTime": 0,
"robotNumberTimes": 1
},
{
"channelId": 2204300,
"robotNumber": 0,
"addRobotModel": "timely",
"changeTime": 20000,
"leftTime": 0,
"robotNumberTimes": 1
}
]
}
}
{
"code": 400,
"status": "error",
"message": "param validate error",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "appId is required.",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "application not found.",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "invalid timestamp.",
"data": ""
}
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}
{
"code": 403,
"status": "error",
"message": "illegal channel id: %s",
"data": ""
}
public void testAddRecordTask() {
String url = "https://api.polyv.net/live/v3/channel/basic/get-rebot-setting";
// appId和加密串
String appId = "xxxxxxx";
String appSecret = "xxxxxxxxxxxxxxxxxx";
Map<String, String> params = new HashMap<>();
params.put("channelIds", "2204300,2180007");
// 调用Polyv的工具类方法设置sign
PolyvTool.setLiveSign(params, appId, appSecret);
String content = HttpClientUtil.getInstance()
.sendHttpPost(url, params);
System.out.println(content);
}