private static final Logger log = LoggerFactory.getLogger(VodVideoAdvertising.class);
/**
* 查询视频播放的地理位置分布
*/
@Test
public void testGetGeoStat() throws Exception, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String secretKey = super.secretKey;
String userId = super.userId;
String ptime = String.valueOf(System.currentTimeMillis());
//业务参数
String url = String.format("http://api.polyv.net/v2/geo/%s", userId);
String dr = "7days";
String start = "2021-03-16";
String end = "2021-03-24";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("userId", userId);
requestMap.put("ptime", ptime);
requestMap.put("dr", dr);
requestMap.put("start", start);
requestMap.put("end", end);
requestMap.put("sign", VodSignUtil.getSign(requestMap, secretKey));
String response = HttpUtil.get(url, requestMap);
log.debug("测试查询视频播放的地理位置分布,{}", response);
//do somethings
}