类 ContactApi
java.lang.Object
com.easemob.im.api.ContactApi
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addContact(String ownerUsername, String friendUsername) 添加好友 添加好友,好友必须是和当前用户在一个 App Key 下的用户。okhttp3.CalladdContactAsync(String ownerUsername, String friendUsername, ApiCallback<EMAddContactResult> _callback) 添加好友 (asynchronously) 添加好友,好友必须是和当前用户在一个 App Key 下的用户。okhttp3.CalladdContactCall(String ownerUsername, String friendUsername, ApiCallback _callback) Build call for addContactaddContactWithHttpInfo(String ownerUsername, String friendUsername) 添加好友 添加好友,好友必须是和当前用户在一个 App Key 下的用户。getAllContactList(String ownerUsername) 一次性获取好友列表 一次性获取指定用户的好友列表。okhttp3.CallgetAllContactListAsync(String ownerUsername, ApiCallback<EMGetAllContactListResult> _callback) 一次性获取好友列表 (asynchronously) 一次性获取指定用户的好友列表。okhttp3.CallgetAllContactListCall(String ownerUsername, ApiCallback _callback) Build call for getAllContactListgetAllContactListWithHttpInfo(String ownerUsername) 一次性获取好友列表 一次性获取指定用户的好友列表。getContactList(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark) 获取好友列表 获取指定用户的好友列表。okhttp3.CallgetContactListAsync(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark, ApiCallback<EMGetContactListResult> _callback) 获取好友列表 (asynchronously) 获取指定用户的好友列表。okhttp3.CallgetContactListCall(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark, ApiCallback _callback) Build call for getContactListgetContactListWithHttpInfo(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark) 获取好友列表 获取指定用户的好友列表。intimportContactList(String username, Boolean isSendNotice, EMImportContactList emImportContactList) 导入好友列表 你可以调用该接口导入好友列表。okhttp3.CallimportContactListAsync(String username, Boolean isSendNotice, EMImportContactList emImportContactList, ApiCallback<EMImportContactListResult> _callback) 导入好友列表 (asynchronously) 你可以调用该接口导入好友列表。okhttp3.CallimportContactListCall(String username, Boolean isSendNotice, EMImportContactList emImportContactList, ApiCallback _callback) Build call for importContactListimportContactListWithHttpInfo(String username, Boolean isSendNotice, EMImportContactList emImportContactList) 导入好友列表 你可以调用该接口导入好友列表。removeContact(String ownerUsername, String friendUsername) 移除好友 从用户的好友列表中移除一个用户。okhttp3.CallremoveContactAsync(String ownerUsername, String friendUsername, ApiCallback<EMRemoveContactResult> _callback) 移除好友 (asynchronously) 从用户的好友列表中移除一个用户。okhttp3.CallremoveContactCall(String ownerUsername, String friendUsername, ApiCallback _callback) Build call for removeContactremoveContactWithHttpInfo(String ownerUsername, String friendUsername) 移除好友 从用户的好友列表中移除一个用户。voidsetApiClient(ApiClient apiClient) setContactNote(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote) 设置好友备注 你可以调用该接口设置你在当前 app 下的好友的备注,即你和要设置备注的好友需在同一个 App Key 下。okhttp3.CallsetContactNoteAsync(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote, ApiCallback<EMSetContactNoteResult> _callback) 设置好友备注 (asynchronously) 你可以调用该接口设置你在当前 app 下的好友的备注,即你和要设置备注的好友需在同一个 App Key 下。okhttp3.CallsetContactNoteCall(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote, ApiCallback _callback) Build call for setContactNotesetContactNoteWithHttpInfo(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote) 设置好友备注 你可以调用该接口设置你在当前 app 下的好友的备注,即你和要设置备注的好友需在同一个 App Key 下。voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) userContactCheck(EMUserContactCheck emUserContactCheck) 校验好友 批量检查用户是否在好友列表中。okhttp3.CalluserContactCheckAsync(EMUserContactCheck emUserContactCheck, ApiCallback<EMUserContactCheckResult> _callback) 校验好友 (asynchronously) 批量检查用户是否在好友列表中。okhttp3.CalluserContactCheckCall(EMUserContactCheck emUserContactCheck, ApiCallback _callback) Build call for userContactCheckuserContactCheckWithHttpInfo(EMUserContactCheck emUserContactCheck) 校验好友 批量检查用户是否在好友列表中。
-
构造器详细资料
-
ContactApi
public ContactApi() -
ContactApi
-
-
方法详细资料
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
addContactCall
public okhttp3.Call addContactCall(String ownerUsername, String friendUsername, ApiCallback _callback) throws ApiException Build call for addContact- 参数:
ownerUsername- (required)friendUsername- (required)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
addContact
public EMAddContactResult addContact(String ownerUsername, String friendUsername) throws ApiException 添加好友 添加好友,好友必须是和当前用户在一个 App Key 下的用户。对于免费版即时通讯服务,单个 App Key 下的每个用户的好友数量上限为 1000,不同服务版本的 App Key 的该数量上限不同。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E6%B7%BB%E5%8A%A0%E5%A5%BD%E5%8F%8B- 参数:
ownerUsername- (required)friendUsername- (required)- 返回:
- EMAddContactResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
addContactWithHttpInfo
public ApiResponse<EMAddContactResult> addContactWithHttpInfo(String ownerUsername, String friendUsername) throws ApiException 添加好友 添加好友,好友必须是和当前用户在一个 App Key 下的用户。对于免费版即时通讯服务,单个 App Key 下的每个用户的好友数量上限为 1000,不同服务版本的 App Key 的该数量上限不同。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E6%B7%BB%E5%8A%A0%E5%A5%BD%E5%8F%8B- 参数:
ownerUsername- (required)friendUsername- (required)- 返回:
- ApiResponse<EMAddContactResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
addContactAsync
public okhttp3.Call addContactAsync(String ownerUsername, String friendUsername, ApiCallback<EMAddContactResult> _callback) throws ApiException 添加好友 (asynchronously) 添加好友,好友必须是和当前用户在一个 App Key 下的用户。对于免费版即时通讯服务,单个 App Key 下的每个用户的好友数量上限为 1000,不同服务版本的 App Key 的该数量上限不同。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E6%B7%BB%E5%8A%A0%E5%A5%BD%E5%8F%8B- 参数:
ownerUsername- (required)friendUsername- (required)_callback- The callback to be executed when the API call finishes- 返回:
- The request call
- 抛出:
ApiException- If fail to process the API call, e.g. serializing the request body object http.response.details
-
getAllContactListCall
public okhttp3.Call getAllContactListCall(String ownerUsername, ApiCallback _callback) throws ApiException Build call for getAllContactList- 参数:
ownerUsername- (required)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
getAllContactList
一次性获取好友列表 一次性获取指定用户的好友列表。文档介绍:https://doc.easemob.com/document/server-side/user_relationship.html#%E4%B8%80%E6%AC%A1%E6%80%A7%E8%8E%B7%E5%8F%96%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
ownerUsername- (required)- 返回:
- EMGetAllContactListResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
getAllContactListWithHttpInfo
public ApiResponse<EMGetAllContactListResult> getAllContactListWithHttpInfo(String ownerUsername) throws ApiException 一次性获取好友列表 一次性获取指定用户的好友列表。文档介绍:https://doc.easemob.com/document/server-side/user_relationship.html#%E4%B8%80%E6%AC%A1%E6%80%A7%E8%8E%B7%E5%8F%96%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
ownerUsername- (required)- 返回:
- ApiResponse<EMGetAllContactListResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
getAllContactListAsync
public okhttp3.Call getAllContactListAsync(String ownerUsername, ApiCallback<EMGetAllContactListResult> _callback) throws ApiException 一次性获取好友列表 (asynchronously) 一次性获取指定用户的好友列表。文档介绍:https://doc.easemob.com/document/server-side/user_relationship.html#%E4%B8%80%E6%AC%A1%E6%80%A7%E8%8E%B7%E5%8F%96%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
ownerUsername- (required)_callback- The callback to be executed when the API call finishes- 返回:
- The request call
- 抛出:
ApiException- If fail to process the API call, e.g. serializing the request body object http.response.details
-
getContactListCall
public okhttp3.Call getContactListCall(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark, ApiCallback _callback) throws ApiException Build call for getContactList- 参数:
ownerUsername- (required)limit- 每次期望返回的好友数量,取值范围为 [1,50],默认值为 10 (optional)cursor- 数据查询的起始位置 (optional)needReturnRemark- 是否需要返回好友备注,默认为 true (optional)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
getContactList
public EMGetContactListResult getContactList(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark) throws ApiException 获取好友列表 获取指定用户的好友列表。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E8%8E%B7%E5%8F%96%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
ownerUsername- (required)limit- 每次期望返回的好友数量,取值范围为 [1,50],默认值为 10 (optional)cursor- 数据查询的起始位置 (optional)needReturnRemark- 是否需要返回好友备注,默认为 true (optional)- 返回:
- EMGetContactListResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
getContactListWithHttpInfo
public ApiResponse<EMGetContactListResult> getContactListWithHttpInfo(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark) throws ApiException 获取好友列表 获取指定用户的好友列表。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E8%8E%B7%E5%8F%96%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
ownerUsername- (required)limit- 每次期望返回的好友数量,取值范围为 [1,50],默认值为 10 (optional)cursor- 数据查询的起始位置 (optional)needReturnRemark- 是否需要返回好友备注,默认为 true (optional)- 返回:
- ApiResponse<EMGetContactListResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
getContactListAsync
public okhttp3.Call getContactListAsync(String ownerUsername, Integer limit, String cursor, Boolean needReturnRemark, ApiCallback<EMGetContactListResult> _callback) throws ApiException 获取好友列表 (asynchronously) 获取指定用户的好友列表。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E8%8E%B7%E5%8F%96%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
ownerUsername- (required)limit- 每次期望返回的好友数量,取值范围为 [1,50],默认值为 10 (optional)cursor- 数据查询的起始位置 (optional)needReturnRemark- 是否需要返回好友备注,默认为 true (optional)_callback- The callback to be executed when the API call finishes- 返回:
- The request call
- 抛出:
ApiException- If fail to process the API call, e.g. serializing the request body object http.response.details
-
removeContactCall
public okhttp3.Call removeContactCall(String ownerUsername, String friendUsername, ApiCallback _callback) throws ApiException Build call for removeContact- 参数:
ownerUsername- (required)friendUsername- (required)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
removeContact
public EMRemoveContactResult removeContact(String ownerUsername, String friendUsername) throws ApiException 移除好友 从用户的好友列表中移除一个用户。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E7%A7%BB%E9%99%A4%E5%A5%BD%E5%8F%8B- 参数:
ownerUsername- (required)friendUsername- (required)- 返回:
- EMRemoveContactResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
removeContactWithHttpInfo
public ApiResponse<EMRemoveContactResult> removeContactWithHttpInfo(String ownerUsername, String friendUsername) throws ApiException 移除好友 从用户的好友列表中移除一个用户。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E7%A7%BB%E9%99%A4%E5%A5%BD%E5%8F%8B- 参数:
ownerUsername- (required)friendUsername- (required)- 返回:
- ApiResponse<EMRemoveContactResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
removeContactAsync
public okhttp3.Call removeContactAsync(String ownerUsername, String friendUsername, ApiCallback<EMRemoveContactResult> _callback) throws ApiException 移除好友 (asynchronously) 从用户的好友列表中移除一个用户。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E7%A7%BB%E9%99%A4%E5%A5%BD%E5%8F%8B- 参数:
ownerUsername- (required)friendUsername- (required)_callback- The callback to be executed when the API call finishes- 返回:
- The request call
- 抛出:
ApiException- If fail to process the API call, e.g. serializing the request body object http.response.details
-
setContactNoteCall
public okhttp3.Call setContactNoteCall(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote, ApiCallback _callback) throws ApiException Build call for setContactNote- 参数:
ownerUsername- (required)friendUsername- (required)emSetContactNote- (optional)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
setContactNote
public EMSetContactNoteResult setContactNote(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote) throws ApiException 设置好友备注 你可以调用该接口设置你在当前 app 下的好友的备注,即你和要设置备注的好友需在同一个 App Key 下。对于免费版即时通讯服务,单个 App Key 下的每个用户的好友数量上限为 100,不同服务套餐包的 App Key 的该数量上限不同。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E8%AE%BE%E7%BD%AE%E5%A5%BD%E5%8F%8B%E5%A4%87%E6%B3%A8- 参数:
ownerUsername- (required)friendUsername- (required)emSetContactNote- (optional)- 返回:
- EMSetContactNoteResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
setContactNoteWithHttpInfo
public ApiResponse<EMSetContactNoteResult> setContactNoteWithHttpInfo(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote) throws ApiException 设置好友备注 你可以调用该接口设置你在当前 app 下的好友的备注,即你和要设置备注的好友需在同一个 App Key 下。对于免费版即时通讯服务,单个 App Key 下的每个用户的好友数量上限为 100,不同服务套餐包的 App Key 的该数量上限不同。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E8%AE%BE%E7%BD%AE%E5%A5%BD%E5%8F%8B%E5%A4%87%E6%B3%A8- 参数:
ownerUsername- (required)friendUsername- (required)emSetContactNote- (optional)- 返回:
- ApiResponse<EMSetContactNoteResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
setContactNoteAsync
public okhttp3.Call setContactNoteAsync(String ownerUsername, String friendUsername, EMSetContactNote emSetContactNote, ApiCallback<EMSetContactNoteResult> _callback) throws ApiException 设置好友备注 (asynchronously) 你可以调用该接口设置你在当前 app 下的好友的备注,即你和要设置备注的好友需在同一个 App Key 下。对于免费版即时通讯服务,单个 App Key 下的每个用户的好友数量上限为 100,不同服务套餐包的 App Key 的该数量上限不同。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E8%AE%BE%E7%BD%AE%E5%A5%BD%E5%8F%8B%E5%A4%87%E6%B3%A8- 参数:
ownerUsername- (required)friendUsername- (required)emSetContactNote- (optional)_callback- The callback to be executed when the API call finishes- 返回:
- The request call
- 抛出:
ApiException- If fail to process the API call, e.g. serializing the request body object http.response.details
-
importContactListCall
public okhttp3.Call importContactListCall(String username, Boolean isSendNotice, EMImportContactList emImportContactList, ApiCallback _callback) throws ApiException Build call for importContactList- 参数:
username- (required)isSendNotice- 好友导入后是否向 SDK 发送通知:- true:是;-(默认)false:否 (optional)emImportContactList- (optional)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
importContactList
public EMImportContactListResult importContactList(String username, Boolean isSendNotice, EMImportContactList emImportContactList) throws ApiException 导入好友列表 你可以调用该接口导入好友列表。文档介绍:https://doc.easemob.com/document/server-side/user_relationship.html#%E5%AF%BC%E5%85%A5%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
username- (required)isSendNotice- 好友导入后是否向 SDK 发送通知:- true:是;-(默认)false:否 (optional)emImportContactList- (optional)- 返回:
- EMImportContactListResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
importContactListWithHttpInfo
public ApiResponse<EMImportContactListResult> importContactListWithHttpInfo(String username, Boolean isSendNotice, EMImportContactList emImportContactList) throws ApiException 导入好友列表 你可以调用该接口导入好友列表。文档介绍:https://doc.easemob.com/document/server-side/user_relationship.html#%E5%AF%BC%E5%85%A5%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
username- (required)isSendNotice- 好友导入后是否向 SDK 发送通知:- true:是;-(默认)false:否 (optional)emImportContactList- (optional)- 返回:
- ApiResponse<EMImportContactListResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
importContactListAsync
public okhttp3.Call importContactListAsync(String username, Boolean isSendNotice, EMImportContactList emImportContactList, ApiCallback<EMImportContactListResult> _callback) throws ApiException 导入好友列表 (asynchronously) 你可以调用该接口导入好友列表。文档介绍:https://doc.easemob.com/document/server-side/user_relationship.html#%E5%AF%BC%E5%85%A5%E5%A5%BD%E5%8F%8B%E5%88%97%E8%A1%A8- 参数:
username- (required)isSendNotice- 好友导入后是否向 SDK 发送通知:- true:是;-(默认)false:否 (optional)emImportContactList- (optional)_callback- The callback to be executed when the API call finishes- 返回:
- The request call
- 抛出:
ApiException- If fail to process the API call, e.g. serializing the request body object http.response.details
-
userContactCheckCall
public okhttp3.Call userContactCheckCall(@Nullable EMUserContactCheck emUserContactCheck, ApiCallback _callback) throws ApiException Build call for userContactCheck- 参数:
emUserContactCheck- (optional)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
userContactCheck
public EMUserContactCheckResult userContactCheck(@Nullable EMUserContactCheck emUserContactCheck) throws ApiException 校验好友 批量检查用户是否在好友列表中。文档介绍:https://doc.easemob.com/document/server-side/user_friend_check.html- 参数:
emUserContactCheck- (optional)- 返回:
- EMUserContactCheckResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
userContactCheckWithHttpInfo
public ApiResponse<EMUserContactCheckResult> userContactCheckWithHttpInfo(@Nullable EMUserContactCheck emUserContactCheck) throws ApiException 校验好友 批量检查用户是否在好友列表中。文档介绍:https://doc.easemob.com/document/server-side/user_friend_check.html- 参数:
emUserContactCheck- (optional)- 返回:
- ApiResponse<EMUserContactCheckResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
userContactCheckAsync
public okhttp3.Call userContactCheckAsync(@Nullable EMUserContactCheck emUserContactCheck, ApiCallback<EMUserContactCheckResult> _callback) throws ApiException 校验好友 (asynchronously) 批量检查用户是否在好友列表中。文档介绍:https://doc.easemob.com/document/server-side/user_friend_check.html- 参数:
emUserContactCheck- (optional)_callback- The callback to be executed when the API call finishes- 返回:
- The request call
- 抛出:
ApiException- If fail to process the API call, e.g. serializing the request body object http.response.details
-