private final Logger log = LoggerFactory.getLogger(getClass());
/**
* 查询主播频道关联关系
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void listChannelAnchorRelationTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "https://api.polyv.net/live/v4/channel/anchor/list-relation";
Integer pageNumber = 1;
Integer pageSize = 10;
Long anchorId = 1L;
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("pageNumber", pageNumber);
requestMap.put("pageSize", pageSize);
requestMap.put("anchorId", anchorId);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = HttpUtil.appendUrl(url, requestMap);
String response = HttpUtil.get(url, null);
log.info("测试查询主播频道关联关系结果:{}", response);
//do somethings
}