Screenshot Service
1、添加指定时间点截图任务
描述
通过视频id、截图等相关参数添加视频指定时间点截图任务
接口地址(仅做说明使用):https://api.polyv.net/v2/video/snapshot/%s/addTask调用约束
单元测试
@Test
public void testCreateScreenshotTask() throws IOException, NoSuchAlgorithmException {
VodCreateScreenshotTaskRequest vodCreateScreenshotTaskRequest = new VodCreateScreenshotTaskRequest();
Integer vodCreateScreenshotTaskResponse = null;
try {
vodCreateScreenshotTaskRequest.setUploadTime(new Date())
.setVideoId(super.getTestVideoId())
.setOffsetTimes("8");
vodCreateScreenshotTaskResponse = new VodScreenshotServiceImpl().createScreenshotTask(
vodCreateScreenshotTaskRequest);
Assert.assertNotNull(vodCreateScreenshotTaskResponse);
if (vodCreateScreenshotTaskResponse != null) {
log.debug("测试添加指定时间点截图任务成功,{}", vodCreateScreenshotTaskResponse);
}
} catch (PloyvSdkException e) {
//参数校验不合格 或者 请求服务器端500错误,错误信息见PloyvSdkException.getMessage()
log.error(e.getMessage(), e);
// 异常返回做B端异常的业务逻辑,记录log 或者 上报到ETL 或者回滚事务
throw e;
} catch (Exception e) {
log.error("SDK调用异常", e);
throw e;
}
}单元测试说明
请求入参描述
参数名
必选
类型
说明
返回对象描述
2、查询截图任务状态
描述
调用约束
单元测试
单元测试说明
请求入参描述
参数名
必选
类型
说明
返回对象描述
参数名
类型
说明
参数名
类型
说明
Last updated