private static final Logger log = LoggerFactory.getLogger(getClass());
/**
* 创建集团分帐号
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void createGroupUserTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.groupAppId;
String appSecret = super.groupAppSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v4/group/user/create";
String email = "polyvtest123456@polyv.net";
String password = "polyvtest123456";
String contacts = "张三";
String phone = "17600000000";
String maxChannels = "10";
String concurrent = "1000";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
Map<String, Object> jsonMap = new HashMap<>();
jsonMap.put("email", email);
jsonMap.put("password", password);
jsonMap.put("contacts", contacts);
jsonMap.put("phone", phone);
jsonMap.put("maxChannels", maxChannels);
jsonMap.put("concurrent", concurrent);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = HttpUtil.appendUrl(url, requestMap);
String response = HttpUtil.postJsonBody(url, JSON.toJSONString(jsonMap), null);
log.info("测试创建集团分帐号成功:{}", response);
//do somethings
}