添加获取聊天室成员API接口
This commit is contained in:
@@ -30,5 +30,13 @@ public class ChatroomAdmin {
|
||||
InputGetChatroomInfo input = new InputGetChatroomInfo(chatroomId);
|
||||
return AdminHttpUtils.httpJsonPost(path, input, OutputGetChatroomInfo.class);
|
||||
}
|
||||
|
||||
public static IMResult<OutputStringList> getChatroomMembers(String chatroomId) throws Exception {
|
||||
String path = APIPath.Chatroom_GetMembers;
|
||||
InputGetChatroomInfo input = new InputGetChatroomInfo(chatroomId);
|
||||
return AdminHttpUtils.httpJsonPost(path, input, OutputStringList.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -545,6 +545,13 @@ public class Main {
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
IMResult<OutputStringList> memberList = ChatroomAdmin.getChatroomMembers(chatroomId);
|
||||
if (memberList != null && memberList.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
|
||||
System.out.println("get chatroom member success");
|
||||
} else {
|
||||
System.out.println("get chatroom member failure: " + memberList.getErrorCode().msg);
|
||||
}
|
||||
|
||||
IMResult<Void> voidIMResult = ChatroomAdmin.destroyChatroom(chatroomId);
|
||||
if (voidIMResult != null && voidIMResult.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
|
||||
System.out.println("destroy chatroom done!");
|
||||
|
||||
Reference in New Issue
Block a user