https://api.polyv.net/live/v3/channel/questionnaire/list-mc
1、接口用于获取多个频道的问卷列表,包括改已经提交数量
2、接口支持https
{
"code": 200,
"status": "success",
"message": "",
"data": {
"pageSize": 10,
"pageNumber": 1,
"totalItems": 2,
"contents": [
{
"questionnaireId": "fefg598lfj",
"channelId": 108888,
"userId": "edvf2fpec9",
"name": "测试问卷_1564105496583",
"status": "forbidden",
"createdTime": 1564105498000,
"lastModified": 1564105498000,
"endTime": 1564105580000,
"customQuestionnaireId": "xxxxxx",
"submitCount": 123
},
{
"questionnaireId": "fefg4s724k",
"channelId": 108888,
"userId": "edvf2fpec9",
"name": "测试问卷",
"status": "forbidden",
"createdTime": 1564105469000,
"lastModified": 1564105469000,
"endTime": 1564105487000,
"customQuestionnaireId": "xxxxxx",
"submitCount": 123
},
,
{
"questionnaireId": "fefg4s724j",
"channelId": 108887,
"userId": "edvf2fpec9",
"name": "测试问卷3",
"status": "forbidden",
"createdTime": 1564105469000,
"lastModified": 1564105469000,
"endTime": 1564105487000,
"customQuestionnaireId": "xxxxxx",
"submitCount": 123
}
],
"startRow": 1,
"firstPage": true,
"lastPage": true,
"nextPageNumber": 1,
"prePageNumber": 1,
"limit": 2,
"endRow": 2,
"totalPages": 1,
"offset": 0
}
}
{
"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": ""
}
<?php
//引用config.php
include 'config.php';
$params = array(
'appId' => $appId,
'timestamp' => $timestamp,
'channelIds' => "108888"
);
//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法
$params['sign'] = $sign;
$url = "https://api.polyv.net/live/v3/channel/questionnaire/list-mc?".http_build_query($params);
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);
echo $res;
?>