Commit 10b62a36772d4442aba89677779ce86be3d60b9c

Authored by 李志鑫
1 parent c370d94a

修改

01.点播云/1.11 获取点播列表接口App.md
... ... @@ -6,95 +6,70 @@ Title: 1.1 获取点播信息接口
6 6  
7 7  
8 8 ### 接口地址 ###
9   -http://api.cnlive.com/open/api2/vod_epg/getVodInfo4App
  9 +http://api.cnlive.com/open/api2/vod_epg/getVodListInfo4App
10 10  
11 11 ### 接口协议 ###
12   -HTTP GET
  12 +HTTP POST
13 13  
14 14 ### 接口请求参数 ###
15 15 |参数名| 参数类型 | 必选 | 参数说明 |
16 16 |:----- | :------: | :------: | :------: |
17   -|appId| string | true | 应用ID |
18   -|vId| string | true | 点播节目标识 |
19   -|platform_id| string | true | APP bundleID 或者是包名,平台鉴权使用 |
20   -|timestamp| int | true | 精确到秒,当前Unix时间戳,请保证请求服务器时间正确 |
21   -|sign| String | true | 签名规则见 [签名详情] (http://help.open.cnlive.com/common.html) |
  17 +|appId| string | true | 格式必须 : spid_xxxxx |
  18 +|pageNumber| int | false | 默认1 |
  19 +|pageSize| int | false | 默认10 上限100 |
  20 +
22 21  
23 22 ### 返回值 ###
24 23  
25 24 | 参数名 | 参数类型 | 必选 | 参数说明 |
26 25 | :-----------| :------: | :------: | :------: |
27   -| errorCode| int | true | 错误类型号 |
28   -| errorMessage| string | true | 错误类型 |
29   -| title| string | true | 节目标题 |
30   -| subTitle| string | false | 节目副标题 |
31   -| description| string | false | 节目描述 |
32   -| createTime| string | true | 创建时间,格式:yyyyMMddHHmmss |
33   -| publishTime| string | true | 发布时间,格式:yyyyMMddHHmmss |
34   -| status| string | true | 节目状态,0:待发布,1:已发布,2:下线 |
35   -| vId| string | true | 节目的唯一标识 |
36   -| rates | string | ture |清晰度标识,多个用逗号隔开: 流畅版=1,清晰版=2,高清版=3,超高清=4 |
  26 +| type| string | true | vod |
  27 +| vId| string | true | 编号 |
  28 +| title| string | true | 标题 |
  29 +| subTitle| string | false | 副标题 |
  30 +| category| int | true | 分类,100001 电影,100002 电视剧,100004 娱乐,100008 咨询,100012 体育,100016 教育,100026 其他 |
  31 +| img| string | false | 图片 |
  32 +| description| string | true | 描述 |
  33 +| tag| string | true | 标签,关键字;多个用逗号分隔 |
  34 +| rates| string | true | 多个用逗号分隔,流畅1 ;标清2;高清3;超清4 |
37 35  
38 36 返回JSON格式的节目元数据信息,json示例如下:
39 37  
40 38 ``` json
41 39 {
42   - "errorMessage":"请求成功",
43   - "data":{
44   - "createTime":"20160808125905",
45   - "publishTime":"20160808131657",
46   - "status":"1",
47   - "vId":"174e6c5f3d9e4ddeb739feed1906fa11",
48   - "vipFlag":"0",
49   - "packagePomID":"3_ent/xingwenrebao/yuleqianxian/",
50   - "subTitle":"BTOB对粉丝甜喊:我想你们了",
51   - "rates":"1,2,4",
52   - "title":"BTOB甜喊:我想你们了",
53   - "description":"@TV娱乐前线:韩国男团BTOB近日在台北国际会议中心举行演唱会。",
54   - },
55   - "errorCode":"0"
  40 + "data": [
  41 + {
  42 + "vId": "8e2620fef9a14d139a05c75e4cb2ed71",
  43 + "img": "http://y2.cnliveimg.com:8080/image/itv/2017/0602/8e2620fef9a14d139a05c75e4cb2ed71_218067_100.jpg",
  44 + "subTitle": "《三体》强势回归上海",
  45 + "rates": "1,3,2",
  46 + "description": "@TV娱乐前线:6月1日《三体》舞台剧回归上海,高精尖的科技打造3D裸眼特效。",
  47 + "tag": "娱评,内地,刘方,资讯",
  48 + "title": "《三体》强势回归上海",
  49 + "category": 100004
  50 + },
  51 + {
  52 + "vId": "bbdcbe047c3e42ed83a9d8197f55ce97",
  53 + "img": "http://trans-test.ks3-cn-beijing.ksyun.com/82/img/2017/0612/ff8080815c1eae11015c9b8224d5067b/00002.jpg@base@tag=imgScale&w=224&h=126&m=2&c=1",
  54 + "subTitle": "人民的名义 05_超清",
  55 + "rates": "1,2,3,4",
  56 + "description": "人民的名义",
  57 + "tag": "人民的名义",
  58 + "title": "人民的名义 05_超清",
  59 + "category": 100002
  60 + },
  61 + {
  62 + "vId": "009982264d8d488586a6cf5ca285bfd2",
  63 + "img": "http://trans-test.ks3-cn-beijing.ksyun.com/82/img/2017/0614/ff8080815c1eae11015ca5ba5677069d/00004.jpg@base@tag=imgScale&w=224&h=126&m=2&c=1",
  64 + "subTitle": "2015年中央电视台春节联欢晚会",
  65 + "rates": "2,4,3,1",
  66 + "description": "2015央视春晚节目单于2015年1月26日发布,在这份曝光的名单中,毕福剑将搭档阔别春晚舞台11年的“大笑姑婆”杨蕾;蔡明将继续搭档潘长江;郭冬临拉上“女神”刘涛;冯巩组成新团队;曹云金刘云天将表演相声,今早,中央电视台新闻频道播发春晚新闻:羊年春晚语言类节目完成终审,十个以上节目通过终审入围春晚彩排,蔡明、潘长江、冯巩、郭冬临、开心麻花团队、喜乐街“四喜丸子”及春晚语言类导演汤浩。",
  67 + "tag": "2015,春节联欢晚会,春节,央视春晚",
  68 + "title": "2015年中央电视台春节联欢晚会",
  69 + "category": 100004
  70 + }
  71 + ],
  72 + "errorMessage": "请求成功",
  73 + "errorCode": 0
56 74 }
57   -```
58   -#### java 示例
59   -
60   -```java
61   -public Object getVodUrl() {
62   - String result = "";
63   - Map params = new HashMap<>();
64   - params.put("appId", "60_iqj730vn11");
65   - params.put("vId", "174e6c5f3d9e4ddeb739feed1906fa11");
66   - params.put("timestamp", System.currentTimeMillis()/1000+"");
67   - String url = OpenUtil.buildURL("http://api.cnlive.com/open/api/dianbo/getVodInfo4App", params, "appId对应key值");
68   - HttpURLConnection connection;
69   - try {
70   - URL requestUrl = new URL(url);
71   - connection = (HttpURLConnection)requestUrl.openConnection();
72   - connection.setRequestMethod("GET");
73   - connection.setDoInput(true);
74   - connection.setDoOutput(true);
75   - connection.connect();//连接
76   -
77   - //获得返回值
78   - if(connection.getResponseCode() == HttpURLConnection.HTTP_OK){
79   - InputStream in = connection.getInputStream();
80   - String currentLine = "";
81   - if(in != null){
82   - BufferedReader br = new BufferedReader(new InputStreamReader(in,"utf-8"));
83   - while((currentLine = br.readLine()) != null){
84   - result += currentLine;
85   - }
86   - br.close();
87   - }
88   - }
89   - }catch (Exception e) {
90   - e.printStackTrace();
91   - }
92   -
93   - if(BaseUtil.notBlank(result)) {
94   - JSONObject resultJson = JSONObject.parseObject(result);
95   - return resultJson
96   - }
97   -
98   - return "";
99   - }
100 75 ```
101 76 \ No newline at end of file
... ...