获取最热视频列表(v1.0 版)

getHotList

    作用:获取用户最热门视频的列表

URL

    http://v.polyv.net/uc/services/rest?method=getHotList

支持格式

    XML/JSON

HTTP请求方式

    POST,GET

请求数限制

    TRUE

请求参数

参数名必选类型及范围说明
readtokentruestring用户的读取钥匙
pageNumtrueint取第几页
numPerPagefalseint平均每页取多少条数据
formatfalsestring默认返回json格式,如果format=xml返回xml格式
jsonpfalsestring 例如,正常情况{error:0,data:""},加jsonp=a后返回a({error:0,data:""})

注意事项

    返回错误列表
返回说明
0无错误
1找不到writetoken关联的user
2文件为空或者writetoken为空
3提交的json名字JSONRPC为null
4提交文件格式不正确
5readtoken为空
6分页输入出错
7vid不能为空
8找不到方法名

返回结果

<xml>
<error>0</error>
<data>
<video>
<swf_link>

http://player.polyv.net/videos/e2e84a73839ec97a51c368d746dd2d09_e.swf

</swf_link>
<status>60</status>
<tag/>
<seed>0</seed>
<playerwidth>600</playerwidth>
<title>
【Youtube奇趣精选】2分钟灾难大片!最后的结尾竟然。。。—在线播放—优酷网,视频高清在线观看_0
</title>
<duration>00:00:15</duration>
<df>1</df>
<first_image>

http://img.videocc.net/uimage/e/e2e84a7383/9/e2e84a73839ec97a51c368d746dd2d09_0.jpg

</first_image>
<times>54</times>
<context/>
<original_definition>544x270</original_definition>
<playerheight>313</playerheight>
<vid>e2e84a73839ec97a51c368d746dd2d09_e</vid>
<ptime>2014-09-17 16:01:25</ptime>
<cataid>1</cataid>
</video>
<video>
<swf_link>

http://player.polyv.net/videos/e2e84a73834420049e9227c4bd1ddbc5_e.swf

</swf_link>
<status>60</status>
<tag>心灵鸡汤</tag>
<seed>1</seed>
<playerwidth>400</playerwidth>
<title>问答</title>
<duration>00:00:30</duration>
<df>3</df>
<first_image>

http://img.videocc.net/uimage/e/e2e84a7383/5/e2e84a73834420049e9227c4bd1ddbc5_0.jpg

</first_image>
<times>44</times>
<context>动物</context>
<original_definition>1280x720</original_definition>
<playerheight>300</playerheight>
<vid>e2e84a73834420049e9227c4bd1ddbc5_e</vid>
<ptime>2014-09-09 09:44:07</ptime>
<cataid>1410230776538</cataid>
</video>
<video>
<swf_link>

http://player.polyv.net/videos/e2e84a7383a3276af77d75de601b492f_e.swf

</swf_link>
<status>60</status>
<tag>心,灵,鸡,汤</tag>
<seed>1</seed>
<playerwidth>600</playerwidth>
<title>课件</title>
<duration>00:00:15</duration>
<df>1</df>
<first_image>

http://img.videocc.net/uimage/e/e2e84a7383/f/e2e84a7383a3276af77d75de601b492f_0.jpg

</first_image>
<times>32</times>
<context/>
<original_definition>448x336</original_definition>
<playerheight>466</playerheight>
<vid>e2e84a7383a3276af77d75de601b492f_e</vid>
<ptime>2014-09-09 09:43:47</ptime>
<cataid>1</cataid>
</video>
</data>
</xml>

JSON示例

{
"error": "0",
"data": [
{
"swf_link": "http://player.polyv.net/videos/e2e84a73839ec97a51c368d746dd2d09_e.swf",
"status": "60",
"tag": "",
"seed": 0,
"playerwidth": "600",
"title": "【Youtube奇趣精选】2分钟灾难大片!最后的结尾竟然。。。—在线播放—优酷网,视频高清在线观看_0",
"duration": "00:00:15",
"df": 1,
"first_image": "http://img.videocc.net/uimage/e/e2e84a7383/9/e2e84a73839ec97a51c368d746dd2d09_0.jpg",
"times": "54",
"context": "",
"original_definition": "544x270",
"playerheight": "313",
"vid": "e2e84a73839ec97a51c368d746dd2d09_e",
"ptime": "2014-09-17 16:01:25",
"cataid": "1"
},
{
"swf_link": "http://player.polyv.net/videos/e2e84a73834420049e9227c4bd1ddbc5_e.swf",
"status": "60",
"tag": "心灵鸡汤",
"seed": 1,
"playerwidth": "400",
"title": "问答",
"duration": "00:00:30",
"df": 3,
"first_image": "http://img.videocc.net/uimage/e/e2e84a7383/5/e2e84a73834420049e9227c4bd1ddbc5_0.jpg",
"times": "44",
"context": "动物",
"original_definition": "1280x720",
"playerheight": "300",
"vid": "e2e84a73834420049e9227c4bd1ddbc5_e",
"ptime": "2014-09-09 09:44:07",
"cataid": "1410230776538"
},
{
"swf_link": "http://player.polyv.net/videos/e2e84a7383a3276af77d75de601b492f_e.swf",
"status": "60",
"tag": "心,灵,鸡,汤",
"seed": 1,
"playerwidth": "600",
"title": "课件",
"duration": "00:00:15",
"df": 1,
"first_image": "http://img.videocc.net/uimage/e/e2e84a7383/f/e2e84a7383a3276af77d75de601b492f_0.jpg",
"times": "32",
"context": "",
"original_definition": "448x336",
"playerheight": "466",
"vid": "e2e84a7383a3276af77d75de601b492f_e",
"ptime": "2014-09-09 09:43:47",
"cataid": "1"
}
]
}

字段说明

字段说明
error错误提示
swf_link返回flash连接
duration返回时长
title标题
first_image视频图片
times点击次数
tag标签
context内容
ptime上传时间
vid视频id
如果API想调用签名,可参考http://dev.polyv.net/2014/09/23/jsapi0028/ 按参数签名顺序拼凑字符串为numPerPage=$(numPerPage)&pageNum=$(pageNum)&readtoken=$(readtoken)$(secretkey),并进行sha1计算,得到sign。
以上内容是否对您有帮助?根本没有帮助文档较差文档一般文档不错文档很好
Loading...