1、通过视频id获取视频关联课件信息
2、接口URL中的{userid}为点播账号userid,具体参考菜单【使用须知】->【获取密钥】
3、接口支持https协议
http://api.polyv.net/v2/video/{userid}/getPPTPage
http://api.polyv.net/v2/video/1b448be323/getPPTPage?vid=1b448be3239482977934f099f2ceaa0a_1&sign=7CA059DC9F8359A0C96BAEC2E2B0A53D7772D416&ptime=1617674841740
private static final Logger log = LoggerFactory.getLogger(VodVideoCourseWare.class);
/**
* 查询课件
*/
@Test
public void testGetCourseWare() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String secretKey = super.secretKey;
String userid = super.userId;
String ptime = String.valueOf(System.currentTimeMillis());
//业务参数
String url = String.format("https://api.polyv.net/v2/video/%s/getPPTPage", userid);
String vid = "1b448be3239482977934f099f2ceaa0a_1";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("ptime", ptime);
requestMap.put("vid", vid);
requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
String response = HttpUtil.get(url, requestMap);
log.debug("测试查询课件,{}", response);
//do somethings
}
{
"code": 200,
"status": "success",
"message": "success",
"data": [{
"pageNo": 1,
"pageTitle": "hello,word",
"pageImage": "https://doc-oss.polyv.net/images/2021/04/736cde140f73437997729a1066140cf1e6bdefb8/736cde140f73437997729a1066140cf1e6bdefb8_0000.jpeg",
"pageThumbnail": "https://doc-oss.polyv.net/images/2021/04/736cde140f73437997729a1066140cf1e6bdefb8/736cde140f73437997729a1066140cf1e6bdefb8_0000_s.jpeg",
"showTime": 0
}, {
"pageNo": 2,
"pageTitle": "hello,word",
"pageImage": "https://doc-oss.polyv.net/images/2021/04/736cde140f73437997729a1066140cf1e6bdefb8/736cde140f73437997729a1066140cf1e6bdefb8_0001.jpeg",
"pageThumbnail": "https://doc-oss.polyv.net/images/2021/04/736cde140f73437997729a1066140cf1e6bdefb8/736cde140f73437997729a1066140cf1e6bdefb8_0001_s.jpeg",
"showTime": 0
}, {
"pageNo": 3,
"pageTitle": "hello,word",
"pageImage": "https://doc-oss.polyv.net/images/2021/04/736cde140f73437997729a1066140cf1e6bdefb8/736cde140f73437997729a1066140cf1e6bdefb8_0002.jpeg",
"pageThumbnail": "https://doc-oss.polyv.net/images/2021/04/736cde140f73437997729a1066140cf1e6bdefb8/736cde140f73437997729a1066140cf1e6bdefb8_0002_s.jpeg",
"showTime": 0
}]
}
{
"code": 400,
"status": "error",
"message": "ptime is too old.",
"data": ""
}