获取视频回收站列表

点击这里查看旧版

接口URL

http://api.polyv.net/v2/video/{userid}/get-del-list

接口说明

(接口调用有频率限制,详细请查看)

获取用户回收站视频的列表

返回结果支持格式

XML/JSON

请求方式

POST,GET

请求数限制

TRUE

请求参数

参数名 必选 类型及范围 说明
userid true string 用户的id
format false string 默认返回json格式,如果format=xml返回xml格式
jsonp false string 例如,正常情况{"code":200,…,data[]},加jsonp=a后返回/* */a({"code":200,…,data[]})
numPerPage false int 平均每页取多少条数据
pageNum true int 取第几页
ptime true float 13位的当前时间毫秒级时间戳
sign true string 签名

返回结果

<xml> 
  <code>200</code>  
  <status>success</status>  
  <message>success</message>  
  <data> 
    <videoDetail> 
      <images_b>3828390191/5/38283901913ea95224af2bbd9e990ea5_0_b.jpg</images_b>  
      <images_b>3828390191/5/38283901913ea95224af2bbd9e990ea5_1_b.jpg</images_b>  
      <images_b>3828390191/5/38283901913ea95224af2bbd9e990ea5_2_b.jpg</images_b>  
      <images_b>3828390191/5/38283901913ea95224af2bbd9e990ea5_3_b.jpg</images_b>  
      <images_b>3828390191/5/38283901913ea95224af2bbd9e990ea5_4_b.jpg</images_b>  
      <images_b>3828390191/5/38283901913ea95224af2bbd9e990ea5_5_b.jpg</images_b>  
      <images>3828390191/5/38283901913ea95224af2bbd9e990ea5_0.jpg</images>  
      <images>3828390191/5/38283901913ea95224af2bbd9e990ea5_1.jpg</images>  
      <images>3828390191/5/38283901913ea95224af2bbd9e990ea5_2.jpg</images>  
      <images>3828390191/5/38283901913ea95224af2bbd9e990ea5_3.jpg</images>  
      <images>3828390191/5/38283901913ea95224af2bbd9e990ea5_4.jpg</images>  
      <images>3828390191/5/38283901913ea95224af2bbd9e990ea5_5.jpg</images>  
      <tag/>  
      <mp4>http://mpv.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_1.mp4</mp4>  
      <title>0001.优酷网-【经典回顾】加州旅馆 2004版 中英字幕 老鹰乐队[超清版]-0003</title>  
      <df>3</df>  
      <times>0</times>  
      <vid>38283901913ea95224af2bbd9e990ea5_3</vid>  
      <mp4_1>http://mpv.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_1.mp4</mp4_1>  
      <mp4_2>http://mpv.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_2.mp4</mp4_2>  
      <mp4_3>http://mpv.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_3.mp4</mp4_3>  
      <cataid>1</cataid>  
      <swf_link>http://player.polyv.net/videos/38283901913ea95224af2bbd9e990ea5_3.swf</swf_link>  
      <status>61</status>  
      <seed>0</seed>  
      <flv1>http://plvod01.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_1.flv</flv1>  
      <flv2>http://plvod01.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_2.flv</flv2>  
      <flv3>http://plvod01.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_3.flv</flv3>  
      <sourcefile/>  
      <playerwidth>600</playerwidth>  
      <default_video>http://plvod01.videocc.net/3828390191/5/38283901913ea95224af2bbd9e990ea5_3.flv</default_video>  
      <duration>00:02:01</duration>  
      <first_image>http://img.videocc.net/uimage/3/3828390191/first_image/a15c4fe5-9fdc-4a38-adc0-2e6097757fbb_s.jpg</first_image>  
      <original_definition>1104x622</original_definition>  
      <context/>  
      <playerheight>337</playerheight>  
      <ptime>2017-04-25 11:35:06</ptime>  
      <source_filesize>22502693</source_filesize>  
      <filesize1>4755814</filesize1>  
      <filesize2>8694257</filesize2>  
      <filesize3>21784017</filesize3>  
      <md5checksum>8c6a35b5e92f84437c56de6f40b39973</md5checksum>  
      <hls>http://hls.videocc.net/3828390191/3/38283901913ea95224af2bbd9e990ea5_1.m3u8</hls>  
      <hls>http://hls.videocc.net/3828390191/3/38283901913ea95224af2bbd9e990ea5_2.m3u8</hls>  
      <hls>http://hls.videocc.net/3828390191/3/38283901913ea95224af2bbd9e990ea5_3.m3u8</hls>  
      <previewVid>v63c44pl69mnc04m6l6512ck4468m41cl_6</previewVid>  
      <uploader> 
        <email>test2@zzs.com</email>  
        <name>test2</name>  
        <role>上传者</role> 
      </uploader>
      <keepsource>0<keepsource/>
      <hlsLevel>open</hlsLevel>
      <cataname>新建分类测试</cataname>
    </videoDetail> 
  </data> 
</xml>

JSON示例

{
    code: 200,
    status: "success",
    message: "success",
    data: [{
        tag: "",
        mp4: "http://mpv.videocc.net/7d26575efe/f/7d26575efe097ad66523d19b094c8a8f_1.mp4",
        title: "Wildlife",
        df: 3,
        times: "30",
        vid: "7d26575efe097ad66523d19b094c8a8f_7",
        mp4_1: "http://mpv.videocc.net/7d26575efe/f/7d26575efe097ad66523d19b094c8a8f_1.mp4",
        mp4_2: "http://mpv.videocc.net/7d26575efe/f/7d26575efe097ad66523d19b094c8a8f_2.mp4",
        mp4_3: "http://mpv.videocc.net/7d26575efe/f/7d26575efe097ad66523d19b094c8a8f_3.mp4",
        cataid: "1491449370131",
        swf_link: "http://player.polyv.net/videos/7d26575efe097ad66523d19b094c8a8f_7.swf",
        status: "61",
        seed: 1,
        playerwidth: "600",
        duration: "00:00:30",
        first_image: "http://img.videocc.net/uimage/7/7d26575efe/f/7d26575efe097ad66523d19b094c8a8f_5.jpg",
        original_definition: "1280x720",
        context: "",
        playerheight: "337",
        ptime: "2017-04-06 15:23:36",
        source_filesize: 26246026,
        filesize: [
            1272725,
            2279413,
            5108761
        ],
        md5checksum: "d8c2eafd90c266e19ab9dcacc479f8af",
        hls: [
            "http://hls.videocc.net/7d26575efe/7/7d26575efe097ad66523d19b094c8a8f_1.m3u8",
            "http://hls.videocc.net/7d26575efe/7/7d26575efe097ad66523d19b094c8a8f_2.m3u8",
            "http://hls.videocc.net/7d26575efe/7/7d26575efe097ad66523d19b094c8a8f_3.m3u8"
        ],
        uploader: {
                "email": "test@test.com",
                "name": "cest",
                "role": "上传者"
         },
         keepsource: "0",
         cataname: "web加密"
        }]
}

请求失败返回json示例

{
  code: 400,
  status: "error",
  message: "the sign is not right.",
  data: ""
}

字段说明

字段 说明
code 请求返回状态码
status 请求返回状态
message 请求返回信息
tag 视频标签
mp4 MP4源文件
title 标题
df 视频码率数
times 播放次数
vid 视频id
mp4_1 流畅码率mp4格式视频地址
mp4_2 高清码率mp4格式视频地址
mp4_3 超清码率mp4格式视频地址
cataid 分类id, 如1为根目录
swf_link 返回视频flash链接
status 视频状态码(data中的status)
seed 加密视频为1,非加密为0
playerwidth 视频宽度
duration 时长
first_image 视频首图
original_definition 最佳分辨率
context 视频描述
playerheight 视频高度
ptime 视频上传日期
source_filesize 源视频文件大小
md5checksum 上传到POLYV云平台的视频源文件的MD5值,可以用来校验是否上传错误或完整
hls 流畅、高清、超清清晰度的m3u8
total 视频总数
keepsource 是否为源文件,否:0,是:1
uploader.email 上传者邮箱
uploader.name 上传者名称
uploader.role 上传者角色,如管理员,上传者,主账号
hlsLevel 加密等级 open:非授权加密 web:web授权 app:app授权 wxa_app:小程序授权
cataname 分类名称

PHP示例代码

<?php
header("Content-type: text/html; charset=utf-8"); 
$userid="7d26575efe"; //true
$format=""; //flase 默认为json
$jsonp=""; //false 设置后变成“/**/设置的字符串”
$numPerPage=100; //false
$pageNum=1;  //true
$ptime=time()*1000;//13位 true
//var_dump($ptime);
$post_data = array (
    "format" => $format,
    "jsonp" => $jsonp,
    "numPerPage" => $numPerPage,
    "pageNum" => $pageNum,
    "ptime" => $ptime,
);
$secretkey="ABIEn1UJht";
// sign的规则:
// format=参数&jsonp=参数&numPerPage=参数&pageNum=参数&ptime=参数secureKey经过SHA-1加密再经过大写化
// (注意如果这里如果没有jsonp,则不需要拼接&jsonp=参数)
$str="";
foreach ($post_data as $key => $value){
    if (!empty($value)) {
        $str.=$key."=".$value."&";
    }else{
        unset($post_data[$key]);    //摧毁变量
    }
}
$str=substr($str, 0,strlen($str)-1);  //substr() 函数返回字符串的一部分
$str.=$secretkey; 
// echo $str;
// exit();
$hash=strtoupper(sha1($str));  //转换为大写
//var_dump($hash);
$post_data["sign"] = $hash;// true
// var_dump($post_data);
// exit();
$url="http://api.polyv.net/v2/video/{$userid}/get-del-list";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// post数据
curl_setopt($ch, CURLOPT_POST, 1);
// post的变量
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$output = curl_exec($ch);
curl_close($ch);
//打印获得的数据
print_r($output);

视频状态码 含义
60/61 已发布
10 等待编码
20 正在编码
50 等待审核
51 审核不通过
-1 已删除

sign的生成规则

format=参数&jsonp=参数&numPerPage=参数&pageNum=参数&ptime=参数secureKey经过SHA-1加密再经过大写化
(注意:参数为空时,则在生成sign的时候不需要添加此字段。如果这里没有jsonp,则不需要拼接&jsonp=参数)

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