private static final Logger log = LoggerFactory.getLogger(VodStatisticsTest.class);
/**
* 查询账号的空间流量使用
* @throws Exception
* @throws NoSuchAlgorithmException
*/
@Test
public void testGetTotalUsage() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String secretKey = super.secretKey;
String userId = super.userId;
String ptime = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/v2/user/" + userId + "/main";
String date="2021-04-09";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("userId", userId);
requestMap.put("ptime", ptime);
requestMap.put("date", date);
requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
String response = HttpUtil.postFormBody(url, requestMap);
log.debug("测试查询账号的空间流量使用,{}", response);
//do somethings
}