private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 修改频道总开关
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testUpdateMasterSwitch() throws IOException, NoSuchAlgorithmException {
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v4/channel/distribute/update-master-switch";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("channelId", "2272655");
requestMap.put("distributeEnabled", "Y");
requestMap.put("enforce", "N");
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = HttpUtil.appendUrl(url,requestMap);
String response = HttpUtil.postFormBody(url,null);
log.info("测试修改频道总开关,返回值:{}", response);
}