代码拉取完成,页面将自动刷新
package io.rong.example.chatroom;
import io.rong.CenterEnum;
import io.rong.RongCloud;
import io.rong.methods.chatroom.ban.BanAllMember;
import io.rong.models.chatroom.ChatroomModel;
import io.rong.models.response.ChatroomBanListResult;
import io.rong.models.response.ResponseResult;
import io.rong.models.response.StatusResult;
/**
* Chatroom Mute All Members
* @author RongCloud
*/
public class BanAllMemberExample {
/**
* Replace with your App Key
* */
private static final String appKey = "appKey";
/**
* Replace with your App Secret
* */
private static final String appSecret = "appSecret";
public static void main(String[] args) throws Exception {
RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret, CenterEnum.BJ);
BanAllMember banAllMember = rongCloud.chatroom.banAllMember;
/**
*
* Mute all members in a chatroom
* */
ChatroomModel chatroom = new ChatroomModel();
chatroom.setId("RC_Test_chatroom1");
ResponseResult result = banAllMember.add(chatroom);
System.out.println("addBanAllMember: " + result.toString());
/**
* Check the mute status of all members in a chatroom
* */
StatusResult statusResult = banAllMember.check(chatroom);
System.out.println("checkBanAllMember: " + statusResult.toString());
/**
* Get the list of all muted members in the chatroom
*/
ChatroomBanListResult chatroomBanListResult = banAllMember.getList(10,1);
System.out.println("listBanAllMember: " + chatroomBanListResult.toString());
/**
*
* Remove the mute for all members in the chatroom
*/
ResponseResult removeResult = banAllMember.remove(chatroom);
System.out.println("removeBanAllMember: " + removeResult.toString());
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。