查询账号下所有频道详细信息

接口URL

http://api.polyv.net/live/v3/channel/management/list-detail

接口说明

1、获取账号下所有的频道详细信息列表
2、接口支持https协议

支持格式

JSON

请求方式

 POST

请求参数

参数名 必选 类型 说明
page int 页数默认为1
pageSize int 每页显示的数据条数,默认每页显示20条数据
appId string 从API设置中获取,在直播系统登记的appId
sign string 签名,为32位大写的MD5值
timestamp string 当前13位毫秒级时间戳,3分钟内有效
categoryId int 所属分类id
watchStatus string 观看页状态筛选,live-直播中,playback-回放中,end-已结束,waiting-未开始

响应成功JSON示例:

{
    "code": 200,
    "status": "success",
    "message": "",
    "data": {
        "pageSize": 20,
        "pageNumber": 1,
        "totalItems": 5,
        "contents": [{
            "channelId": 329298,
            "name": "Java课程",
            "channelPasswd": "123456",
            "categoryId": "177474",
            "scene": "topclass",
            "watchStatus": "waiting",
            "watchStatusText": "未开始",
            "sceneText": "大班课",
            "watchUrl": "https://live.polyv.cn/watch/329298",
            "content": "<p>开始了缴费解放路水电费;发送第三方数据fs</p><p><br></p><p><br></p><p><br></p><p>f伺服电机三方洛索洛芬</p>",
            "startTime": 0,
            "authSetting": [{
                "channelId": 329298,
                "rank": 1,
                "userId": "ee7fe7fbda",
                "globalSettingEnabled": "N",
                "enabled": "Y",
                "authType": "pay",
                "authTips": "欢迎观看本次直播",
                "payAuthTips": "欢迎观看本次直播",
                "codeAuthTips": "欢迎观看本次直播",
                "infoAuthTips": "欢迎观看本次直播",
                "authCode": null,
                "qcodeTips": null,
                "qcodeImg": null,
                "price": 0.10,
                "watchEndTime": null,
                "validTimePeriod": null,
                "customKey": "qydFTAaARY",
                "customUri": null,
                "externalKey": "qydFTAaARY",
                "externalUri": null,
                "externalRedirectUri": null,
                "directKey": null,
                "trialWatchEnabled": "N",
                "trialWatchTime": 1,
                "trialWatchEndTime": null
            }, {
                "channelId": 329298,
                "rank": 2,
                "userId": "ee7fe7fbda",
                "globalSettingEnabled": "N",
                "enabled": "N",
                "authType": "none",
                "authTips": "欢迎观看本次直播",
                "payAuthTips": "欢迎观看本次直播",
                "codeAuthTips": "欢迎观看本次直播",
                "infoAuthTips": "欢迎观看本次直播",
                "authCode": null,
                "qcodeTips": null,
                "qcodeImg": null,
                "price": 0.00,
                "watchEndTime": null,
                "validTimePeriod": null,
                "customKey": "qydFTAaARY",
                "customUri": null,
                "externalKey": "qydFTAaARY",
                "externalUri": null,
                "externalRedirectUri": null,
                "directKey": null,
                "trialWatchEnabled": "N",
                "trialWatchTime": null,
                "trialWatchEndTime": null
            }]
        }, {
            "channelId": 314392,
            "name": "云直播测试",
            "channelPasswd": "702036",
            "categoryId": "177474",
            "scene": "ppt",
            "watchStatus": "waiting",
            "watchStatusText": "未开始",
            "sceneText": "三分屏",
            "watchUrl": "https://live.polyv.cn/watch/314392",
            "content": "",
            "startTime": 0,
            "authSetting": [{
                "userId": "ee7fe7fbda",
                "rank": 1,
                "enabled": "N",
                "authType": "none",
                "authTips": "欢迎观看本次直播",
                "payAuthTips": "欢迎观看本次直播",
                "codeAuthTips": "欢迎观看本次直播",
                "infoAuthTips": "欢迎观看本次直播",
                "authCode": null,
                "qcodeTips": null,
                "qcodeImg": null,
                "price": 0.00,
                "watchEndTime": null,
                "validTimePeriod": null,
                "customKey": null,
                "customUri": null,
                "externalKey": null,
                "externalUri": null,
                "externalRedirectUri": null,
                "directKey": null,
                "trialWatchEnabled": "N",
                "trialWatchTime": null,
                "trialWatchEndTime": null
            }, {
                "userId": "ee7fe7fbda",
                "rank": 2,
                "enabled": "N",
                "authType": "none",
                "authTips": "欢迎观看本次直播",
                "payAuthTips": "欢迎观看本次直播",
                "codeAuthTips": "欢迎观看本次直播",
                "infoAuthTips": "欢迎观看本次直播",
                "authCode": null,
                "qcodeTips": null,
                "qcodeImg": null,
                "price": 0.00,
                "watchEndTime": null,
                "validTimePeriod": null,
                "customKey": null,
                "customUri": null,
                "externalKey": null,
                "externalUri": null,
                "externalRedirectUri": null,
                "directKey": null,
                "trialWatchEnabled": "N",
                "trialWatchTime": null,
                "trialWatchEndTime": null
            }]
        }],
        "startRow": 1,
        "firstPage": true,
        "lastPage": true,
        "nextPageNumber": 1,
        "prePageNumber": 1,
        "limit": 2,
        "totalPages": 1,
        "endRow": 2,
        "offset": 0
    }
}

响应异常JSON示例:

{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}

字段说明

参数名 说明
code 请求状态响应码
status 请求状态
message 错误信息
pageNumber 当前页
totalItems 记录的总数
channelId 频道号
name 频道名称
channelPasswd 频道密码
categoryId 分类ID
scene 场景,alone-活动直播,ppt-三分屏,topclass-大班课
sceneText 场景描述
watchStatus 观看页状态,live-直播中,playback-回放中,end-已结束,waiting-未开始
watchStatusText 观看页状态描述,直播中,回放中,已结束,未开始
watchUrl 观看页链接
content 直播介绍
startTime 直播开始时间
userId 用户ID
rank 用于实现一个频道设置两个观看条件,为1或2(1为主要条件,2为次要条件)
globalSettingEnabled 是否开启全局设置(Y/N)
enabled 是否开启观看条件(Y/N)
authType 观看条件类型(1. 无限制 none 2. 验证码观看 code 3. 付费观看 pay 4. 白名单观看 phone 5. 登记观看 info 6. 分享观看 wxshare 7. 自定义授权观看 custom 8. 外部授权观看 external)
authTips 白名单观看提示信息
payAuthTips 付费观看提示信息
authCode 验证码观看的验证码
qcodeTips 验证码观看的二维码提示
qcodeImg 验证码观看的二维码图片
price 付费观看的价格
watchEndTime 付费观看,截止时间,为null表示:一次付费,永久有效
validTimePeriod 付费观看的截止时长 (天)
customKey 自定义授权观看的key
customUri 自定义授权观看的接口地址
externalKey 外部授权观看的key
externalUri 外部授权观看的接口地址
externalRedirectUri 外部授权观看,用户直接访问观看页时的跳转地址
firstPage 是否为第一页,值为:true/false
lastPage 是否为最后一页,值为:true/false
nextPageNumber 下一页编号
prePageNumber 上一页编号
totalPages 总页数
startRow 当前页第一条记录在总记录中的位置
endRow 当前页最后一个记录在总记录中的位置
limit 当前页纪录数
offset 当前页第一条记录在总记录中的位置

php请求示例

<?php
//引用config.php
include 'config.php';

$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'pageSize' => '5',
  'categoryId' => 89380
);

//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "http://api.polyv.net/live/v3/channel/management/list-detail?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 0);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>

签名规则(config.php文件代码查看)

http://dev.polyv.net/2018/liveproduct/l-api/rule/sign/

以上内容是否对您有帮助?根本没有帮助文档较差文档一般文档不错文档很好
Loading...