https://api.polyv.net/v2/play-list/add-video
{
"code": 200,
"status": "success",
"message": "success"
}
签名不正确
{
"code":400,
"status":"error",
"message":"the sign is not right",
"data":""
}
时间戳过期
{
"code":400,
"status":"error",
"message":"ptime is too old.",
"data":""
}
添加失败,请检查视频是否重复添加、或者playListId、vid是否存在且合法
{
"code": 400,
"status": "error",
"message": "Add video failed",
"data": ""
}
public void testAddVideoToPlayList() throws Exception {
String url = "https://api.polyv.net/v2/play-list/add-video";
Map<String, String> params = new HashMap<>();
params.put("userid", userid);
long playListId = 1620142496099L;
params.put("playListId", String.valueOf(playListId));
params.put("vid", "a2dc4f25174db4e911ce6fbf2cbd81cc_a");
params.put("ptime", String.valueOf(System.currentTimeMillis()));
params.put("sign", getSign(params, secretkey));
String response = HttpClientUtil.getInstance().sendHttpPost(url, params);
System.out.println(response);
}