https://api.polyv.net/live/v3/channel/basic/get-channels
1、接口用于批量查询频道信息接口息
2、接口支持https
{
"code": 200,
"status": "success",
"message": "",
"data": [
{
"channelId": 1976099,
"name": "金山cdn",
"scene": "ppt",
"channelPasswd": "4bb763",
"publisher": "易方信息科技股份有限公司",
"startTime": 0,
"pageView": 9,
"likes": 0,
"coverImg": "//liveimages.videocc.net/uploaded/images/2020/12/fu7jh8cifb.jpg",
"splashImg": "//liveimages.videocc.net/uploaded/images/2020/12/fu7jl4dfwc.png",
"splashEnabled": "N",
"desc": "",
"consultingMenuEnabled": "Y",
"maxViewerRestrict": "N",
"maxViewer": -1,
"watchStatus": "playback",
"watchStatusText": "回放中",
"creatorChildId": null,
"creatorName": "主账号",
"userCategory": {
"categoryId": 177474,
"categoryName": "默认分类",
"userId": "ee7fe7fbda",
"rank": 0
},
"authSettings": [
{
"channelId": 1976099,
"rank": 1,
"userId": "ee7fe7fbda",
"globalSettingEnabled": "Y",
"enabled": "N",
"authType": "phone",
"authTips": "欢迎观看本次直播",
"payAuthTips": "欢迎观看本次直播",
"codeAuthTips": "欢迎观看本次直播",
"infoAuthTips": "欢迎观看本次直播",
"authCode": null,
"qcodeTips": null,
"qcodeImg": null,
"price": 0.00,
"watchEndTime": null,
"validTimePeriod": null,
"customKey": "92daed0df9",
"customUri": null,
"externalKey": "432fdf9889",
"externalUri": null,
"externalRedirectUri": null,
"directKey": "e87d4de349",
"trialWatchEnabled": "N",
"trialWatchTime": null,
"trialWatchEndTime": null,
"whiteListInputTips": "",
"whiteListEntryText": "会员入口",
"infoDesc": ""
},
{
"channelId": 1976099,
"rank": 2,
"userId": "ee7fe7fbda",
"globalSettingEnabled": "Y",
"enabled": "N",
"authType": "none",
"authTips": "欢迎观看本次直播",
"payAuthTips": "欢迎观看本次直播",
"codeAuthTips": "欢迎观看本次直播",
"infoAuthTips": "欢迎观看本次直播",
"authCode": null,
"qcodeTips": null,
"qcodeImg": null,
"price": 0.00,
"watchEndTime": null,
"validTimePeriod": null,
"customKey": "0c97e07670",
"customUri": null,
"externalKey": "33004355bd",
"externalUri": null,
"externalRedirectUri": null,
"directKey": "a4951d801f",
"trialWatchEnabled": "N",
"trialWatchTime": null,
"trialWatchEndTime": null,
"whiteListInputTips": null,
"whiteListEntryText": "",
"infoDesc": null
}
],
"bgImg": "//liveimages.videocc.net/uploaded/images/2020/12/fu7jmmi8qw.jpg",
"videoList": [
{
"videoId": "f72f1ae298",
"videoPoolId": "ee7fe7fbda102f4d74a264c1b559f6d9_e"
}
]
}
]
}
{
"code": 400,
"status": "error",
"message": "param validate error",
"data": 400
}
{
"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 void test() {
String url = "https://api.polyv.net/live/v3/channel/basic/get-channels";
// 用户对应的appId和加密串
String appId = "xxxxxxxxx";
String appSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
Map<String, String> params = new HashMap<>();
params.put("channelIds", "100,1000,30003");
PolyvTool.setLiveSign(params, appId, appSecret);
// 调用Polyv的httpClient工具类发送请求
String content = HttpClientUtil.getInstance()
.sendHttpGet(url + "?" + PolyvTool.mapJoinNotEncode(params));
System.out.println(content);
}