/**
* 创建研讨会频道
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testBasicCreateV4() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际
String appId = super.appId;
String appSecret = super.appSecret;
String userId = super.userId;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v4/channel/create";
String name = "polyv研讨会";
String newScene = "seminar";
String type = "normal";
String seminarHostPassword = "hostpasswd";
String seminarAttendeePassword = "attendeepasswd";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
Map<String, String> bodyMap = new HashMap<>();
bodyMap.put("name", name);
bodyMap.put("newScene", newScene);
bodyMap.put("seminarHostPassword", seminarHostPassword);
bodyMap.put("seminarAttendeePassword", seminarAttendeePassword);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String body = JSON.toJSONString(bodyMap);
url = HttpUtil.appendUrl(url, requestMap);
String response = HttpUtil.postJsonBody(url,body,null);
log.info("测试创建研讨会频道,返回值:{}", response);
//do somethings
}