2.1 获取内容列表接口.md 4.38 KB

;/* Title: 1.1 获取内容信息接口 */

接口描述

接口协议

HTTP GET

接口请求参数

参数名 参数类型 必选 参数说明
appId string true 应用ID
page int false 页号,如为空,默认值:1
pageSize int false 每页返回条数,如为空,默认值:20
verTimestamp long false 时间戳 时间毫秒值,返回最后修改时间在此时间之后的所有内容
groupType string false 内容分组:program(视音频)、richtxt(非视音频)等;
timestamp int true 精确到秒,当前Unix时间戳,请保证请求服务器时间正确,该时间用于签名
sign String true 签名规则见 签名详情

返回值

参数名 参数类型 必选 参数说明
errorCode int true 错误类型号
errorMessage string true 错误类型
totalNum long true 总条数
nextCursor long true 下一页
previousCursor long true 上一页
uuid string true 内容的唯一标识
title string true 内容标题
subTitle string false 内容副标题
desc string false 内容描述
categoryId string true 分类Id
categoryName string false 分类名称
tag string false 标签,多个以 逗号分隔
rates string true 仅对视频码率格式,多种码率用逗号隔开,码率分别定义为:1:流畅;2:清晰;3:高清;4:超清
cpName string true 所属cp, 没有所属CP的,用SPName代替
createDate string true 内容创建时间
verTimestamp long true 最后修改时间,时间戳 时间毫秒值
img map false 内容图片信息
groupImg map false 组图图片信息,仅对组图内容有效
groupType string true 内容分组:program(视音频)、richtxt(非视音频)等;
contentType string true program内容类型:video、live、audio;richtxt内容类型pics、article、vtxt、spectxt、picstxt
注意:某节目可能被检索2次,即一个video类型,一个vtxt类型。

返回JSON格式的节目元数据信息,json示例如下:

{
    "errorCode": 0,
    "errorMessage": "成功",
    "data": {
        "programs": [
            {
                "uuid": "60_d57ad6f690cd4d4899cf56eb32512c19",
                "title": "黄家驹宣传片",
                "categoryId": "100001/72/73",
                "categoryName": "电影/喜剧/电影喜剧子分类",
                "desc": "黄家驹宣传片",
                "img": [
                    {
                        "format": "485*303",
                        "url": "http://y2017.qn.cnliveimg.com/60/img/2017/0818/ff8080815def9dcb015df428048800e6/000006.jpg?imageView2/1/w/485/h/303",
                    },
                    {
                        "format": "224*126",
                        "url": "http://y2017.qn.cnliveimg.com/60/img/2017/0818/ff8080815def9dcb015df428048800e6/000006.jpg?imageView2/1/w/224/h/126",
                    }
                ],
                "groupImg":[
                    {
                        "imgInfo":[
                            {
                              "format": "224*126",
                              "url": "http://y2017.qn.cnliveimg.com/60/img/2017/0818/ff8080815def9dcb015df428048800e6/000006.jpg?imageView2/1/w/224/h/126"
                            },
                            {
                              "format": "640*320",
                              "url": "http://y2017.qn.cnliveimg.com/60/img/2017/0818/ff8080815def9dcb015df428048800e6/000006.jpg?imageView2/1/w/224/h/126"
                            }
                        ]
                        "desc": ""
                    }
                ]
                "rates": "2",
                "cpName": "测试账号",
                "subTitle": "",
                "tag": "黄家驹宣传片",
                "createDate": "2017-08-18",
                "verTimestamp": 1508320723191
            }
        ],
        "totalNum": 1,
        "nextCursor": 0,
        "previousCursor": 0
    }
}