获取签到结果列表

接口URL

https://api.polyv.net/live/v3/channel/checkin/list

接口说明

1、接口用于分页查询频道号下某一天的签到记录
2、接口支持https

支持格式

JSON

请求方式

GET

请求数限制

TRUE

请求参数

参数名 必选 类型 说明
appId string 从API设置中获取,在直播系统登记的appId
timestamp long 13位当前时间戳
sign string 签名值
channelId int 频道号
page int 页码,默认为1
pageSize int 每一页的大小,默认为20
date string 查询的指定日期,格式为yyyy-MM-dd

响应成功JSON示例:

{
  "code": 200,
  "status": "success",
  "message": "",
  "data": {
    "pageNumber": 1,
    "totalPages": 1,
    "pageSize": 20,
    "contents": [
      {
        "id": 491,
        "indate": "2018-08-07",
        "userid": "1533622191653",
        "channelId": 100538,
        "time": 1533622526801,
        "timeFormat": "2018-08-07 14:15",
        "nickname": "广州观众/28838"
      },
      {
        "id": 492,
        "indate": "2018-08-07",
        "userid": "1533622191653",
        "channelId": 100538,
        "time": 1533623311065,
        "timeFormat": "2018-08-07 14:28",
        "nickname": "广州观众/28838"
      },
      {
        "id": 493,
        "indate": "2018-08-07",
        "userid": "1533622191653",
        "channelId": 100538,
        "time": 1533636856928,
        "timeFormat": "2018-08-07 18:14",
        "nickname": "广州观众/28838"
      },
      {
        "id": 494,
        "indate": "2018-08-07",
        "userid": "1533607482637",
        "channelId": 100538,
        "time": 1533636856932,
        "timeFormat": "2018-08-07 18:14",
        "nickname": "chromexr"
      },
      {
        "id": 495,
        "indate": "2018-08-07",
        "userid": "1533625048644",
        "channelId": 100538,
        "time": 1533636875744,
        "timeFormat": "2018-08-07 18:14",
        "nickname": "ffxiaoru"
      }
    ]
  }
}

响应失败JSON示例:

未输入appId

{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}

appId不正确

{
    "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": ""
}

channelId为空

{
  "code": 400, 
  "status": "error", 
  "message": "param should not be empty: channelId", 
  "data": ""
}

channelId为非数字

{
  "code": 400, 
  "status": "error", 
  "message": "param is not number: channelId", 
  "data": ""
}

频道非法

{
  "code": 403, 
  "status": "error", 
  "message": "illegal channel id: 206240", 
  "data": ""
}

字段说明

参数名 说明
code 响应代码,成功为200,失败为400,签名错误为401,异常错误500
status 成功为success,失败为error
message 错误时为错误提示消息
data 签到记录的分页数据
pageNumber 页码
totalPages 总页数
pageSize 每一页大小
contents 签到记录数据数组
indate 查询的签到日期,yyyy-MM-dd格式
nickname 昵称
userid 用户id
channelId 频道号
time 签到的具体时间戳
timeFormat 签到的格式化详细日期,yyyy-MM-dd HH:mm 格式

php请求示例

<?php

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

//接口URL上变量
$appId = "es2vsst178";
$channelId="223350";
$date="2018-08-08";
$pageSize="20";
$page="1";
//接口需要的参数(非sign)赋值
$params = array(
  'appId' => $appId,
  'timestamp' => $timestamp,
  'channelId' => $channelId,
  'page' => $page,
  'pageSize' => $pageSize,
  'date' => $date
);

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

//接口请求url
$url = "https://api.polyv.net/live/v3/channel/checkin/list?appId=".$appId."&sign=".$sign."&timestamp=".$timestamp."&channelId=".$channelId."&page=".$page."&pageSize=".$pageSize."&date=".$date;

//输出接口请求结果
echo file_get_contents($url);

?>

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

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

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