server api添加通过邮箱获取用户列表的接口
This commit is contained in:
@@ -178,6 +178,15 @@ public class Main {
|
||||
System.out.println("get user info by userId failure");
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
IMResult<OutputUserInfoList> userInfoListIMResult = UserAdmin.getUserByEmail("[email protected]");
|
||||
if(userInfoListIMResult.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS || userInfoListIMResult.getErrorCode() == ErrorCode.ERROR_CODE_NOT_EXIST) {
|
||||
System.out.println("getUserByEmail success");
|
||||
} else {
|
||||
System.out.println("getUserByEmail failure");
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
InputOutputUserInfo updateUserInfo = new InputOutputUserInfo();
|
||||
updateUserInfo.setUserId(System.currentTimeMillis()+"");
|
||||
updateUserInfo.setDisplayName("updatedUserName");
|
||||
|
||||
@@ -24,6 +24,11 @@ public class UserAdmin {
|
||||
return AdminHttpUtils.httpJsonPost(path, getUserInfo, InputOutputUserInfo.class);
|
||||
}
|
||||
|
||||
public static IMResult<OutputUserInfoList> getUserByEmail(String email) throws Exception {
|
||||
String path = APIPath.User_Get_Email_Info;
|
||||
return AdminHttpUtils.httpJsonPost(path, email, OutputUserInfoList.class);
|
||||
}
|
||||
|
||||
public static IMResult<OutputGetUserList> getAllUsers(int count, int offset) throws Exception {
|
||||
String path = APIPath.User_Get_All;
|
||||
InputGetUserList input = new InputGetUserList();
|
||||
|
||||
Reference in New Issue
Block a user