Video Question And Answer
1、新增或修改视频问答
描述
通过问答id新增或修改视频问答题目
接口地址(仅做说明使用):https://api.polyv.net/v2/video/save-video-exam调用约束
单元测试
@Test
public void testCreateOrUpdateVideoExam() throws IOException, NoSuchAlgorithmException {
VodCreateOrUpdateVideoExamRequest vodCreateOrUpdateVideoExamRequest = new VodCreateOrUpdateVideoExamRequest();
VodCreateOrUpdateVideoExamResponse vodCreateOrUpdateVideoExamResponse = null;
try {
List<VodCreateOrUpdateVideoExamRequest.Choices> choices = Arrays.asList(
new VodCreateOrUpdateVideoExamRequest.Choices(0, "萝卜", Boolean.TRUE),
new VodCreateOrUpdateVideoExamRequest.Choices(1, "青菜", Boolean.FALSE));
vodCreateOrUpdateVideoExamRequest.setExamId("17982289508")
.setVideoId("1b448be3234406608b7838c7ef6b597c_1")
.setShowTime(2)
.setQuestion("喜欢萝卜还是青菜")
.setChoices(choices)
.setCanSkip(Boolean.FALSE)
.setExplanationIfRight("回答正确后的解答详情")
.setShowExplanationIfWrong(Boolean.TRUE)
.setExplanationIfWrong("回答错误后的解答详情")
.setBackTime(-1);
vodCreateOrUpdateVideoExamResponse = new VodInfoServiceImpl().createOrUpdateVideoExam(
vodCreateOrUpdateVideoExamRequest);
Assert.assertNotNull(vodCreateOrUpdateVideoExamResponse);
if (vodCreateOrUpdateVideoExamResponse != null) {
log.debug("测试新增或修改视频问答成功,{}", JSON.toJSONString(vodCreateOrUpdateVideoExamResponse));
}
} 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、查询单个视频的问答题目
描述
调用约束
单元测试
单元测试说明
请求入参描述
参数名
必选
类型
说明
返回对象描述
参数名
类型
说明
参数名
类型
说明
3、批量查询答题日志
描述
调用约束
单元测试
单元测试说明
请求入参描述
参数名
必选
类型
说明
返回对象描述
参数名
类型
说明
参数名
类型
说明
4、删除单个视频的问答题目
描述
调用约束
单元测试
单元测试说明
请求入参描述
参数名
必选
类型
说明
返回对象描述
Last updated