Commit a12f9675e72d01e3ddd35c869eff1466e8f1aa9f

Authored by 张奎
1 parent 113882d9

修改接口

01.点播云/3.0 获取分类树接口Server.md deleted 100644 → 0
1 -/*  
2 -Title: 3.0 获取分类树接口  
3 -*/  
4 -  
5 -### 接口描述 ###  
6 -  
7 -  
8 -### 接口地址 ###  
9 -http://api.cnlive.com/open/api2/vod_epg/getVodInfo4Server  
10 -  
11 -### 接口协议 ###  
12 -HTTP GET  
13 -  
14 -### 接口请求参数 ###  
15 -|参数名| 参数类型 | 必选 | 参数说明 |  
16 -|:----- | :------: | :------: | :------: |  
17 -|appId| string | true | 应用ID |  
18 -|spId| string | false | spId,为空时返回全局根分类列表,不为空时返回指定SP下的分类树 |  
19 -|sign| String | true | 签名规则见 [签名详情] (http://help.open.cnlive.com/common.html) |  
20 -  
21 -### 返回值 ###  
22 -  
23 -| 参数名 | 参数类型 | 必选 | 参数说明 |  
24 -| :-----------| :------: | :------: | :------: |  
25 -| errorCode| int | true | 错误类型号 |  
26 -| errorMessage| string | true | 错误类型 |  
27 -| categoryId| int | true | 分类Id |  
28 -| categoryName| string | false | 分类名称 |  
29 -| parentId| int | false | 父分类Id |  
30 -  
31 -  
32 -返回JSON格式的节目元数据信息,json示例如下:  
33 -  
34 -``` json  
35 -{  
36 - "data":{  
37 - "categorys": [  
38 - {  
39 - "categoryId": 1000,  
40 - "title": "娱乐",  
41 - "parentId": 0,  
42 - "createDate": "2017-09-10 10:20:30",  
43 - "lastModify": "2017-09-11 12:21:32"  
44 - },  
45 - {  
46 - "categoryId": 1234,  
47 - "title": "娱乐",  
48 - "parentId": 1000,  
49 - "createDate": "2017-09-10 10:20:30",  
50 - "lastModify": "2017-09-11 12:21:32"  
51 - }  
52 - ]  
53 -  
54 - },  
55 - "errorCode":0,  
56 - "errorMessage":"sucess"  
57 -}  
58 -```  
01.点播云/3.1 获取点播列表接口Server.md
@@ -15,7 +15,11 @@ HTTP GET @@ -15,7 +15,11 @@ HTTP GET
15 |参数名| 参数类型 | 必选 | 参数说明 | 15 |参数名| 参数类型 | 必选 | 参数说明 |
16 |:----- | :------: | :------: | :------: | 16 |:----- | :------: | :------: | :------: |
17 |appId| string | true | 应用ID | 17 |appId| string | true | 应用ID |
18 -|vId| string | true | 点播节目标识(直播回放的vId就是创建直播活动时的activityId) | 18 +|categoryId| string | true | 点播节目标识(直播回放的vId就是创建直播活动时的activityId) |
  19 +|spIds| string | true | 点播节目标识(直播回放的vId就是创建直播活动时的activityId) |
  20 +|page| string | true | 点播节目标识(直播回放的vId就是创建直播活动时的activityId) |
  21 +|pageSize| string | true | 点播节目标识(直播回放的vId就是创建直播活动时的activityId) |
  22 +|lastModify| string | true | 时间戳,返回最后修改时间在此时间之后的所有内容 |
19 |timestamp| int | true | 精确到秒,当前Unix时间戳,请保证请求服务器时间正确 | 23 |timestamp| int | true | 精确到秒,当前Unix时间戳,请保证请求服务器时间正确 |
20 |sign| String | true | 签名规则见 [签名详情] (http://help.open.cnlive.com/common.html) | 24 |sign| String | true | 签名规则见 [签名详情] (http://help.open.cnlive.com/common.html) |
21 25
@@ -25,101 +29,55 @@ HTTP GET @@ -25,101 +29,55 @@ HTTP GET
25 | :-----------| :------: | :------: | :------: | 29 | :-----------| :------: | :------: | :------: |
26 | errorCode| int | true | 错误类型号 | 30 | errorCode| int | true | 错误类型号 |
27 | errorMessage| string | true | 错误类型 | 31 | errorMessage| string | true | 错误类型 |
  32 +| videoId| string | true | 节目的唯一标识 |
28 | videoName| string | true | 节目标题 | 33 | videoName| string | true | 节目标题 |
29 | subTitle| string | false | 节目副标题 | 34 | subTitle| string | false | 节目副标题 |
30 | desc| string | false | 节目描述 | 35 | desc| string | false | 节目描述 |
31 | categoryName| string | false | 分类名称 | 36 | categoryName| string | false | 分类名称 |
32 | customCategoryName| string | true | 自定义分类名称 | 37 | customCategoryName| string | true | 自定义分类名称 |
33 | tag| string | false | 标签,多个以 逗号分隔 | 38 | tag| string | false | 标签,多个以 逗号分隔 |
34 -| videoId| string | true | 节目的唯一标识 |  
35 -| duration| int | false | 时长,单位 : 毫秒 |  
36 -| showFileSize| string | false | 文件大小 |  
37 | spid| int | false | 所属sp | 39 | spid| int | false | 所属sp |
38 -| institutionName| string | true | 机构名称 |  
39 | imginfos| map | false | 图片信息| 40 | imginfos| map | false | 图片信息|
40 | rates | string | ture |清晰度标识,多个用逗号隔开: 流畅版=1,清晰版=2,高清版=3,超高清=4 | 41 | rates | string | ture |清晰度标识,多个用逗号隔开: 流畅版=1,清晰版=2,高清版=3,超高清=4 |
41 -| playUrls| Array | false | 播放url|  
42 42
43 返回JSON格式的节目元数据信息,json示例如下: 43 返回JSON格式的节目元数据信息,json示例如下:
44 44
45 ``` json 45 ``` json
46 { 46 {
47 "data":{ 47 "data":{
48 - "categoryName":"资讯",  
49 - "desc":"一带一路特别节目",  
50 - "duration":324000,  
51 - "imginfos":{  
52 - "316*506":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/316/h/506",  
53 - "112*63":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/112/h/63",  
54 - "224*126":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/224/h/126",  
55 - "224*398":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/224/h/398",  
56 - "485*303":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/485/h/303" 48 + "programs":[ {
  49 + "videoId":"17cbfede6f074db18d06fdeb170e41c4",
  50 + "videoName":"大道之行一带一路",
  51 + "categoryName":"资讯",
  52 + "desc":"一带一路特别节目",
  53 + "imginfos":{
  54 + "316*506":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/316/h/506",
  55 + "112*63":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/112/h/63"
  56 + },
  57 + "rates":"1,2",
  58 + "spid":60,
  59 + "subTitle":"",
  60 + "tag":"丝绸之路,一带一路,文化交流,中华文化"
57 }, 61 },
58 - "institutionName":"阿斯蒂芬村",  
59 - "rates":"1,2",  
60 - "showFileSize":418501536,  
61 - "spid":60,  
62 - "subTitle":"",  
63 - "tag":"丝绸之路,一带一路,文化交流,中华文化",  
64 - "videoId":"17cbfede6f074db18d06fdeb170e41c4",  
65 - "videoName":"大道之行一带一路",  
66 - "playUrls":[  
67 - {  
68 - "rate":2,  
69 - "fmt":"hls",  
70 - "url":"http://xxx.m3u8"  
71 - },  
72 - {  
73 - "rate":2,  
74 - "fmt":"mp4",  
75 - "url":"http://xxx.mp4"  
76 - } 62 + {
  63 + "videoId":"17cbfede6f074db18d06fdeb170e41c4",
  64 + "videoName":"大道之行一带一路",
  65 + "categoryName":"资讯",
  66 + "desc":"一带一路特别节目",
  67 + "imginfos":{
  68 + "316*506":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/316/h/506",
  69 + "112*63":"http://test.qnvod.cnlive.com/60/img/2017/0809/ff8080815dc0be57015dc4c1fe380061/000002.jpg?imageView2/1/w/112/h/63"
  70 + },
  71 + "rates":"1,2",
  72 + "spid":60,
  73 + "subTitle":"",
  74 + "tag":"丝绸之路,一带一路,文化交流,中华文化"
  75 + }
  76 +
77 ] 77 ]
  78 +
78 }, 79 },
79 "errorCode":0, 80 "errorCode":0,
80 "errorMessage":"sucess" 81 "errorMessage":"sucess"
81 } 82 }
82 -```  
83 -#### java 示例  
84 -  
85 -```java  
86 -public Object getVodUrl() {  
87 - String result = "";  
88 - Map params = new HashMap<>();  
89 - params.put("appId", "60_iqj730vn11");  
90 - params.put("vId", "174e6c5f3d9e4ddeb739feed1906fa11");  
91 - params.put("timestamp", System.currentTimeMillis()/1000+"");  
92 - String url = OpenUtil.buildURL("http://api.cnlive.com/open/api/dianbo/getVodInfo4Server", params, "appId对应key值");  
93 - HttpURLConnection connection;  
94 - try {  
95 - URL requestUrl = new URL(url);  
96 - connection = (HttpURLConnection)requestUrl.openConnection();  
97 - connection.setRequestMethod("GET");  
98 - connection.setDoInput(true);  
99 - connection.setDoOutput(true);  
100 - connection.connect();//连接  
101 -  
102 - //获得返回值  
103 - if(connection.getResponseCode() == HttpURLConnection.HTTP_OK){  
104 - InputStream in = connection.getInputStream();  
105 - String currentLine = "";  
106 - if(in != null){  
107 - BufferedReader br = new BufferedReader(new InputStreamReader(in,"utf-8"));  
108 - while((currentLine = br.readLine()) != null){  
109 - result += currentLine;  
110 - }  
111 - br.close();  
112 - }  
113 - }  
114 - }catch (Exception e) {  
115 - e.printStackTrace();  
116 - }  
117 -  
118 - if(BaseUtil.notBlank(result)) {  
119 - JSONObject resultJson = JSONObject.parseObject(result);  
120 - return resultJson  
121 - }  
122 -  
123 - return "";  
124 - }  
125 ``` 83 ```
126 \ No newline at end of file 84 \ No newline at end of file