List Service
描述
通过视频标题、分类、标签等条件分页查询视频列表
接口地址(仅做说明使用):https://api.polyv.net/v2/video/search-videos调用约束
单元测试
@Test
public void testGetVideoList() throws IOException, NoSuchAlgorithmException {
VodGetVideoListRequest vodGetVideoListRequest = new VodGetVideoListRequest();
VodGetVideoListResponse vodGetVideoListResponse = null;
try {
vodGetVideoListRequest.setFilters("basicInfo,metaData,transcodeInfo,snapshotInfo")
.setCategoryId("1602300731843")
.setTitle("junit-远程批量上传视频")
.setStatus("60,61")
.setTag("")
.setContainSubCate(Boolean.TRUE)
.setStartTime(super.getDate(2021, 1, 15, 9, 15, 15))
.setEndTime(super.getDate(2021, 3, 15, 9, 15, 15))
.setEncrypted(Boolean.FALSE)
.setPlayAuthEnable(Boolean.FALSE)
.setSort("creationTimeDesc")
.setCurrentPage(1)
.setPageSize(10);
vodGetVideoListResponse = new VodListServiceImpl().getVideoList(vodGetVideoListRequest);
Assert.assertNotNull(vodGetVideoListResponse);
if (vodGetVideoListResponse != null) {
log.debug("测试查询视频列表成功,{}", JSON.toJSONString(vodGetVideoListResponse));
}
} 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;
}
}单元测试说明
请求入参描述
参数名
必选
类型
说明
返回对象描述
参数名
类型
说明
参数名
类型
说明
参数名
类型
说明
参数名
类型
说明
参数名
类型
说明
参数名
类型
说明
Last updated