删除视频打点数据

接口URL

https://api.polyv.net/v2/video/delete-chapter-marker

接口说明

删除视频打点数据

支持格式

JSON

请求方式

POST

请求参数

参数名必选类型及范围说明

userid

string

用户id

ptime

long

当前时间的毫秒级时间戳(13位),3分钟内有效

sign

String

签名,为40位大写的SHA1值【详见签名生成规则

vid

string

视频id

timePoints

string

时间点,单位:秒,多个以英文逗号分隔,如"1,2", 如果不传则删除视频的所有打点信息

返回正确结果JSON示例

{
    "code": 200,
    "status": "success",
    "message": "success",
    "data": "success"
}

返回错误结果JSON示例

签名不正确
{
	"code":400,
	"status":"error",
	"message":"the sign is not right",
	"data":""
}
时间戳过期
{
	"code":400,
	"status":"error",
	"message":"ptime is too old.",
	"data":""
}
vid 不存在
{
    "code": 400,
    "status": "error",
    "message": "video could not find by vid",
    "data": ""
}
vid 不合法
{
    "code": 400,
    "status": "error",
    "message": "Illegal vid",
    "data": ""
}
内部错误,或传了非法参数程序转换异常
{
    "code": 500,
    "status": "fail",
    "message": "undefined error",
    "data": null
}

字段说明

字段说明

code

返回码

status

返回状态

message

返回信息

data

操作结果

java请求示例:

    public void testDeleteChapterMarker() throws Exception {
        String url = "http://api.polyv.net/v2/video/delete-chapter-marker";
        Map<String, String> params = new HashMap<>();
        params.put("userid", userid);
        params.put("vid", "a2dc4f25172872650e7d5c1b8026b13c_a");
        params.put("timePoints", "1,2");
        params.put("ptime", String.valueOf(System.currentTimeMillis()));
        params.put("sign", getSign(params, secretkey));
        String response = HttpClientUtil.getInstance().sendHttpPost(url, params);
        System.out.println(response);
    }

Last updated