/// <summary> /// 广播消息暂时未开放 /// </summary> /// <param name="appkey"></param> /// <param name="appSecret"></param> /// <param name="fromUserId"></param> /// <param name="objectName"></param> /// <param name="content">RC:TxtMsg消息格式{"content":"hello"} RC:ImgMsg消息格式{"content":"ergaqreg", "imageKey":"http://www.demo.com/1.jpg"} RC:VcMsg消息格式{"content":"ergaqreg","duration":3}</param> /// <returns></returns> public static String BroadcastMessage(String appkey, String appSecret, String fromUserId, String objectName, String content) { String postStr = "content=" + content+ "&" +"fromUserId=" + fromUserId + "&" + "objectName=" + objectName ; RongHttpClient client = new RongHttpClient(appkey, appSecret, InterfaceUrl.SendMsgUrl, postStr); return client.ExecutePost(); }
public static String DismissGroup(String appkey, String appSecret, String userId, String groupId) { String postStr = "userId=" + userId + "&" + "groupId=" + groupId; RongHttpClient client = new RongHttpClient(appkey, appSecret, InterfaceUrl.dismissUrl, postStr); return client.ExecutePost(); }
/// <summary> /// /// </summary> /// <param name="appkey"></param> /// <param name="appSecret"></param> /// <param name="chatroomIdInfo">chatroomId=id1001</param> /// <returns></returns> public static String DestroyChatroom(String appkey, String appSecret, String[] chatroomIdInfo) { String postStr = null; for (int i = 0; i < chatroomIdInfo.Length; i++) { if (0 == i) { postStr = chatroomIdInfo[0]; } else { postStr = postStr + "&" + chatroomIdInfo[i]; } } RongHttpClient client = new RongHttpClient(appkey, appSecret, InterfaceUrl.destroyChatroomUrl, postStr); return client.ExecutePost(); }
public static String JoinGroup(String appkey, String appSecret, String userId, String groupId, String groupName) { String postStr = "userId=" + userId + "&" + "groupId=" + groupId + "&" + "groupName=" + groupName; RongHttpClient client = new RongHttpClient(appkey, appSecret, InterfaceUrl.joinGroupUrl, postStr); return client.ExecutePost(); }
public static String GetToken(String appkey,String appSecret,String userId, String name, String portraitUri) { String postStr = "userId=" + userId + "&" + "name=" + name + "&" + "portraitUri=" + portraitUri; RongHttpClient client = new RongHttpClient(appkey, appSecret, InterfaceUrl.getTokenUrl, postStr); return client.ExecutePost(); }
/// <summary> /// /// </summary> /// <param name="appkey"></param> /// <param name="appSecret"></param> /// <param name="userId"></param> /// <param name="groupInfo">groupInfo格式group[groupid10001]=groupname1001</param> /// <returns></returns> public static String syncGroup(String appkey, String appSecret, String userId,String[] groupInfo) { String postStr = "userId=" + userId; for (int i = 0; i < groupInfo.Length; i++) { postStr = postStr + "&" + groupInfo; } RongHttpClient client = new RongHttpClient(appkey, appSecret, InterfaceUrl.syncGroupUrl, postStr); return client.ExecutePost(); }