http://api.polyv.net/live/v3/channel/detail/get-channel-roomIds
1、获取频道分房间列表信息
2、接口支持https
{
"code": 200,
"status": "success",
"message": "",
"data": {
"roomIds": [
"157468201",
"157468202"
]
}
}
{
"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: 1779742",
"data": ""
}
public static void main(String[] args) {
String url = "http://api.polyv.net/live/v3/channel/detail/get-channel-roomIds";
// 用户对应的appId和加密串
String appId = "xxxxxxxxx";
String appSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
Map<String, String> params = new HashMap<>();
params.put("channelId", "0000000");
PolyvTool.setLiveSign(params, appId, appSecret);
// 调用Polyv的httpClient工具类发送请求
String content = HttpClientUtil.getInstance()
.sendHttpGet(url + "?" + PolyvTool.mapJoinNotEncode(params));
System.out.println(content);
}