https://api.polyv.net/live/v3/channel/donate/point/get
1、接口用于获取观众积分打赏的积分
2、接口支持https
{
"code": 200,
"status": "success",
"message": "",
"data": 100
}
{
"code": 400,
"status": "error",
"message": "token expired",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "invalid token.",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "param should not be empty: viewerId",
"data": ""
}
{
"code": 400,
"status": "error",
"message": "param should not be empty: channelId",
"data": ""
}
{
"code": 400,
"data": "",
"message": "forbidden",
"status": "error"
}
public static void test() {
String url = "https://api.polyv.net/live/v3/channel/donate/point/get";
String token = "xxxxxxxxx";
String viewerId = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
int channelId = 10001;
Map<String, String> params = new HashMap<>();
params.put("channelId", channelId);
params.put("viewerId", viewerId);
params.put("token", token);
// 调用Polyv的httpClient工具类发送请求
String content = HttpClientUtil.getInstance()
.sendHttpGet(url + "?" + PolyvTool.mapJoinNotEncode(params));
System.out.println(content);
}