类 BlockApi

java.lang.Object
com.easemob.im.api.BlockApi

public class BlockApi extends Object
  • 构造器详细资料

    • BlockApi

      public BlockApi()
    • BlockApi

      public BlockApi(ApiClient apiClient)
  • 方法详细资料

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • addUserToBlockListCall

      public okhttp3.Call addUserToBlockListCall(String ownerUsername, EMAddUserToBlockList emAddUserToBlockList, ApiCallback _callback) throws ApiException
      Build call for addUserToBlockList
      参数:
      ownerUsername - (required)
      emAddUserToBlockList - (optional)
      _callback - Callback for upload/download progress
      返回:
      Call to execute
      抛出:
      ApiException - If fail to serialize the request body object http.response.details
    • addUserToBlockList

      public EMAddUserToBlockListResult addUserToBlockList(String ownerUsername, EMAddUserToBlockList emAddUserToBlockList) throws ApiException
      添加用户至黑名单 将一个或多个用户添加用户到黑名单。用户被加入黑名单后,无法向你发送消息,也无法发送好友申请。用户可以将任何其他用户添加到黑名单列表,无论该用户是否是好友。好友被加入黑名单后仍在好友列表上显示。每个用户的黑名单人数上限为 500。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E6%B7%BB%E5%8A%A0%E7%94%A8%E6%88%B7%E8%87%B3%E9%BB%91%E5%90%8D%E5%8D%95
      参数:
      ownerUsername - (required)
      emAddUserToBlockList - (optional)
      返回:
      EMAddUserToBlockListResult
      抛出:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
    • addUserToBlockListWithHttpInfo

      public ApiResponse<EMAddUserToBlockListResult> addUserToBlockListWithHttpInfo(String ownerUsername, EMAddUserToBlockList emAddUserToBlockList) throws ApiException
      添加用户至黑名单 将一个或多个用户添加用户到黑名单。用户被加入黑名单后,无法向你发送消息,也无法发送好友申请。用户可以将任何其他用户添加到黑名单列表,无论该用户是否是好友。好友被加入黑名单后仍在好友列表上显示。每个用户的黑名单人数上限为 500。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E6%B7%BB%E5%8A%A0%E7%94%A8%E6%88%B7%E8%87%B3%E9%BB%91%E5%90%8D%E5%8D%95
      参数:
      ownerUsername - (required)
      emAddUserToBlockList - (optional)
      返回:
      ApiResponse<EMAddUserToBlockListResult>
      抛出:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
    • addUserToBlockListAsync

      public okhttp3.Call addUserToBlockListAsync(String ownerUsername, EMAddUserToBlockList emAddUserToBlockList, ApiCallback<EMAddUserToBlockListResult> _callback) throws ApiException
      添加用户至黑名单 (asynchronously) 将一个或多个用户添加用户到黑名单。用户被加入黑名单后,无法向你发送消息,也无法发送好友申请。用户可以将任何其他用户添加到黑名单列表,无论该用户是否是好友。好友被加入黑名单后仍在好友列表上显示。每个用户的黑名单人数上限为 500。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E6%B7%BB%E5%8A%A0%E7%94%A8%E6%88%B7%E8%87%B3%E9%BB%91%E5%90%8D%E5%8D%95
      参数:
      ownerUsername - (required)
      emAddUserToBlockList - (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
    • getBlockListCall

      public okhttp3.Call getBlockListCall(String ownerUsername, Integer pageSize, String cursor, ApiCallback _callback) throws ApiException
      Build call for getBlockList
      参数:
      ownerUsername - (required)
      pageSize - 每次期望返回的黑名单用户的数量。取值范围为 [1,50]。该参数仅在分页获取时为必需 (optional)
      cursor - 数据查询的起始位置。该参数仅在分页获取时为必需 (optional)
      _callback - Callback for upload/download progress
      返回:
      Call to execute
      抛出:
      ApiException - If fail to serialize the request body object http.response.details
    • getBlockList

      public EMGetBlockListResult getBlockList(String ownerUsername, Integer pageSize, String cursor) 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)
      pageSize - 每次期望返回的黑名单用户的数量。取值范围为 [1,50]。该参数仅在分页获取时为必需 (optional)
      cursor - 数据查询的起始位置。该参数仅在分页获取时为必需 (optional)
      返回:
      EMGetBlockListResult
      抛出:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
    • getBlockListWithHttpInfo

      public ApiResponse<EMGetBlockListResult> getBlockListWithHttpInfo(String ownerUsername, Integer pageSize, String cursor) 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)
      pageSize - 每次期望返回的黑名单用户的数量。取值范围为 [1,50]。该参数仅在分页获取时为必需 (optional)
      cursor - 数据查询的起始位置。该参数仅在分页获取时为必需 (optional)
      返回:
      ApiResponse<EMGetBlockListResult>
      抛出:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
    • getBlockListAsync

      public okhttp3.Call getBlockListAsync(String ownerUsername, Integer pageSize, String cursor, ApiCallback<EMGetBlockListResult> _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)
      pageSize - 每次期望返回的黑名单用户的数量。取值范围为 [1,50]。该参数仅在分页获取时为必需 (optional)
      cursor - 数据查询的起始位置。该参数仅在分页获取时为必需 (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
    • removeUserFromBlockListCall

      public okhttp3.Call removeUserFromBlockListCall(String ownerUsername, String blockedUsername, ApiCallback _callback) throws ApiException
      Build call for removeUserFromBlockList
      参数:
      ownerUsername - (required)
      blockedUsername - (required)
      _callback - Callback for upload/download progress
      返回:
      Call to execute
      抛出:
      ApiException - If fail to serialize the request body object http.response.details
    • removeUserFromBlockList

      public EMRemoveUserFromBlockListResult removeUserFromBlockList(String ownerUsername, String blockedUsername) throws ApiException
      从黑名单中移除用户 从用户的黑名单中移除用户: 将好友从黑名单中移除后,恢复好友关系,可以正常收发消息; 将非好友从黑名单中移除后,恢复到未添加好友的状态。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E4%BB%8E%E9%BB%91%E5%90%8D%E5%8D%95%E4%B8%AD%E7%A7%BB%E9%99%A4%E7%94%A8%E6%88%B7
      参数:
      ownerUsername - (required)
      blockedUsername - (required)
      返回:
      EMRemoveUserFromBlockListResult
      抛出:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
    • removeUserFromBlockListWithHttpInfo

      public ApiResponse<EMRemoveUserFromBlockListResult> removeUserFromBlockListWithHttpInfo(String ownerUsername, String blockedUsername) throws ApiException
      从黑名单中移除用户 从用户的黑名单中移除用户: 将好友从黑名单中移除后,恢复好友关系,可以正常收发消息; 将非好友从黑名单中移除后,恢复到未添加好友的状态。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E4%BB%8E%E9%BB%91%E5%90%8D%E5%8D%95%E4%B8%AD%E7%A7%BB%E9%99%A4%E7%94%A8%E6%88%B7
      参数:
      ownerUsername - (required)
      blockedUsername - (required)
      返回:
      ApiResponse<EMRemoveUserFromBlockListResult>
      抛出:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
    • removeUserFromBlockListAsync

      public okhttp3.Call removeUserFromBlockListAsync(String ownerUsername, String blockedUsername, ApiCallback<EMRemoveUserFromBlockListResult> _callback) throws ApiException
      从黑名单中移除用户 (asynchronously) 从用户的黑名单中移除用户: 将好友从黑名单中移除后,恢复好友关系,可以正常收发消息; 将非好友从黑名单中移除后,恢复到未添加好友的状态。文档介绍:https://docs-im-beta.easemob.com/document/server-side/user_relationship.html#%E4%BB%8E%E9%BB%91%E5%90%8D%E5%8D%95%E4%B8%AD%E7%A7%BB%E9%99%A4%E7%94%A8%E6%88%B7
      参数:
      ownerUsername - (required)
      blockedUsername - (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