|
NIMSDK-AOS
10.9.60
|
用户资料操作相关接口 更多...
Public 成员函数 | |
| InvocationFuture< List< NimUserInfo > > | fetchUserInfo (List< String > accounts) |
| 从服务器获取用户资料(每次最多获取150个用户,如果量大,上层请自行分批获取) 更多... | |
| List< NimUserInfo > | getUserInfoList (List< String > accounts) |
| 从本地数据库中批量获取用户资料(同步接口) 更多... | |
| NimUserInfo | getUserInfo (String account) |
| 从本地数据库中获取用户资料(同步接口) 更多... | |
| List< NimUserInfo > | getAllUserInfo () |
| 获取本地数据库中所有用户资料 更多... | |
| InvocationFuture< Void > | updateUserInfo (Map< UserInfoFieldEnum, Object > fields) |
| 更新本人用户资料 更多... | |
| InvocationFuture< Void > | updateUserInfo (Map< UserInfoFieldEnum, Object > fields, AntiSpamConfig antispamConfig) |
| 更新本人用户资料 更多... | |
| InvocationFuture< Void > | setUserState (int state) |
| InvocationFuture< List< NimUserInfo > > | searchUserInfosByKeyword (String keyword) |
| 搜索与关键字匹配的所有用户 更多... | |
| InvocationFuture< List< String > > | searchAccountByName (String name) |
| 根据昵称反查账号 更多... | |
用户资料操作相关接口
在文件 UserService.java 第 16 行定义.
| InvocationFuture<List<NimUserInfo> > com.netease.nimlib.sdk.uinfo.UserService.fetchUserInfo | ( | List< String > | accounts | ) |
从服务器获取用户资料(每次最多获取150个用户,如果量大,上层请自行分批获取)
| accounts | 要获取的用户帐号 |
| List<NimUserInfo> com.netease.nimlib.sdk.uinfo.UserService.getAllUserInfo | ( | ) |
获取本地数据库中所有用户资料
| NimUserInfo com.netease.nimlib.sdk.uinfo.UserService.getUserInfo | ( | String | account | ) |
从本地数据库中获取用户资料(同步接口)
| account | 要获取的用户账号 |
| List<NimUserInfo> com.netease.nimlib.sdk.uinfo.UserService.getUserInfoList | ( | List< String > | accounts | ) |
从本地数据库中批量获取用户资料(同步接口)
| accounts | 要获取的用户帐号集合 |
| InvocationFuture<List<String> > com.netease.nimlib.sdk.uinfo.UserService.searchAccountByName | ( | String | name | ) |
根据昵称反查账号
| name | 昵称 |
| InvocationFuture<List<NimUserInfo> > com.netease.nimlib.sdk.uinfo.UserService.searchUserInfosByKeyword | ( | String | keyword | ) |
搜索与关键字匹配的所有用户
| InvocationFuture<Void> com.netease.nimlib.sdk.uinfo.UserService.setUserState | ( | int | state | ) |
| InvocationFuture<Void> com.netease.nimlib.sdk.uinfo.UserService.updateUserInfo | ( | Map< UserInfoFieldEnum, Object > | fields | ) |
| InvocationFuture<Void> com.netease.nimlib.sdk.uinfo.UserService.updateUserInfo | ( | Map< UserInfoFieldEnum, Object > | fields, |
| AntiSpamConfig | antispamConfig | ||
| ) |
更新本人用户资料
| fields | 要更新的字段和新值, key为字段,value为对应的值 |
| antispamConfig | 反垃圾相关配置参数 |
1.8.11