private static final Logger log = LoggerFactory.getLogger(VodSubAccountTest.class);
/**
* 修改视频信息
* @throws Exception
* @throws NoSuchAlgorithmException
*/
@Test
public void testModifySubVideoInfo() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/v3/video/update-info";
String vid = "1b448be32370f4822ac40fd926112a66_1";
String title = "视频标题";
String describ = "视频描述";
String tag = "视频标签信息";
String publishUrl = "www.baidu.com";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("vid", vid);
requestMap.put("title", title);
requestMap.put("describ", describ);
requestMap.put("tag", tag);
requestMap.put("publishUrl", publishUrl);
//用md5进行签名,使用子账号的secretKey签名
requestMap.put("sign", VodSignUtil.getSignMd5(requestMap, appSecret));
String response = HttpUtil.postFormBody(url, requestMap);
log.debug("测试修改视频信息,{}", response);
//do somethings
}