http://api.polyv.net/hi-class-api/open/file/v1/delete
http://api.polyv.net/hi-class-api/open/file/v1/delete
appId=z2gw5icesv&sign=935F4C0CF3EB84A3EFB2BC691DB714A5&lessonId=6707×tamp=1631780657591&fileId=42ba92e56017f4de261e692630447b662561988animate
强烈建议您使用直播Java SDK完成API的功能对接,直播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
/**
* 删除文档
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testDeleteDocument() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = this.appId;
String appSecret = this.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/hi-class-api/open/file/v1/delete";
String lessonId = "6956";
String fileId = "42ba92e56017f4de261e692630447b662561988animate";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("lessonId", lessonId);
requestMap.put("fileId", fileId);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.postFormBody(url, requestMap);
log.info("测试删除文档:{}", response);
}
{
"code":200,
"status":"success",
"data":null,
"success":true
}
{
"code": 400,
"status": "error",
"data": "",
"error": {
"code": xx,
"desc": "错误描述"
}
}