https://api.polyv.net/live/v3/user/statistics/realtime-concurrence
{
"code": 200,
"status": "success",
"message": "",
"data": 100
}
{
"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": ""
}
public static void testGetUserRealTimeConcurrence() {
String url = "https://api.polyv.net/live/v3/user/statistics/realtime-concurrence";
// 用户对应的appId和加密串
String appId = "xxxxxxxxx";
String appSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
Map<String, String> params = new HashMap<>();
PolyvTool.setLiveSign(params, appId, appSecret);
// 调用Polyv的httpClient工具类发送请求
String content = HttpClientUtil.getInstance()
.sendHttpPost(url, params);
System.out.println(content);
}