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