类 ChatFileApi
java.lang.Object
com.easemob.im.api.ChatFileApi
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明downloadChatFile(String fileUuid, String shareSecret, Boolean thumbnail) 下载文件/下载缩略图 可利用该方法下载图片、语音、视频或其他类型的文件。okhttp3.CalldownloadChatFileAsync(String fileUuid, String shareSecret, Boolean thumbnail, ApiCallback<File> _callback) 下载文件/下载缩略图 (asynchronously) 可利用该方法下载图片、语音、视频或其他类型的文件。okhttp3.CalldownloadChatFileCall(String fileUuid, String shareSecret, Boolean thumbnail, ApiCallback _callback) Build call for downloadChatFiledownloadChatFileWithHttpInfo(String fileUuid, String shareSecret, Boolean thumbnail) 下载文件/下载缩略图 可利用该方法下载图片、语音、视频或其他类型的文件。intvoidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) uploadChatFile(Boolean restrictAccess, File _file) 上传文件 对于附件类型的消息,如图片、语音、视频或其他类型文件,发送消息前需上传文件。okhttp3.CalluploadChatFileAsync(Boolean restrictAccess, File _file, ApiCallback<EMUploadChatFileResult> _callback) 上传文件 (asynchronously) 对于附件类型的消息,如图片、语音、视频或其他类型文件,发送消息前需上传文件。okhttp3.CalluploadChatFileCall(Boolean restrictAccess, File _file, ApiCallback _callback) Build call for uploadChatFileuploadChatFileWithHttpInfo(Boolean restrictAccess, File _file) 上传文件 对于附件类型的消息,如图片、语音、视频或其他类型文件,发送消息前需上传文件。
-
构造器详细资料
-
ChatFileApi
public ChatFileApi() -
ChatFileApi
-
-
方法详细资料
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
downloadChatFileCall
public okhttp3.Call downloadChatFileCall(String fileUuid, String shareSecret, Boolean thumbnail, ApiCallback _callback) throws ApiException Build call for downloadChatFile- 参数:
fileUuid- 服务器为文件生成的 UUID (required)shareSecret- 文件访问密钥。若上传文件时限制了访问,下载该文件时则需要该访问密钥。成功上传文件后,从 文件上传 的响应 body 中获取该密钥 (optional)thumbnail- 是否下载缩略图: true:是,下载缩略图 false:否,下载原文件 若该参数为空,下载原文件 (optional)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
downloadChatFile
public File downloadChatFile(String fileUuid, String shareSecret, Boolean thumbnail) throws ApiException 下载文件/下载缩略图 可利用该方法下载图片、语音、视频或其他类型的文件。文档介绍:https://docs-im-beta.easemob.com/document/server-side/message_download.html#%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6- 参数:
fileUuid- 服务器为文件生成的 UUID (required)shareSecret- 文件访问密钥。若上传文件时限制了访问,下载该文件时则需要该访问密钥。成功上传文件后,从 文件上传 的响应 body 中获取该密钥 (optional)thumbnail- 是否下载缩略图: true:是,下载缩略图 false:否,下载原文件 若该参数为空,下载原文件 (optional)- 返回:
- File
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
downloadChatFileWithHttpInfo
public ApiResponse<File> downloadChatFileWithHttpInfo(String fileUuid, String shareSecret, Boolean thumbnail) throws ApiException 下载文件/下载缩略图 可利用该方法下载图片、语音、视频或其他类型的文件。文档介绍:https://docs-im-beta.easemob.com/document/server-side/message_download.html#%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6- 参数:
fileUuid- 服务器为文件生成的 UUID (required)shareSecret- 文件访问密钥。若上传文件时限制了访问,下载该文件时则需要该访问密钥。成功上传文件后,从 文件上传 的响应 body 中获取该密钥 (optional)thumbnail- 是否下载缩略图: true:是,下载缩略图 false:否,下载原文件 若该参数为空,下载原文件 (optional)- 返回:
- ApiResponse<File>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
downloadChatFileAsync
public okhttp3.Call downloadChatFileAsync(String fileUuid, String shareSecret, Boolean thumbnail, ApiCallback<File> _callback) throws ApiException 下载文件/下载缩略图 (asynchronously) 可利用该方法下载图片、语音、视频或其他类型的文件。文档介绍:https://docs-im-beta.easemob.com/document/server-side/message_download.html#%E4%B8%8B%E8%BD%BD%E6%96%87%E4%BB%B6- 参数:
fileUuid- 服务器为文件生成的 UUID (required)shareSecret- 文件访问密钥。若上传文件时限制了访问,下载该文件时则需要该访问密钥。成功上传文件后,从 文件上传 的响应 body 中获取该密钥 (optional)thumbnail- 是否下载缩略图: true:是,下载缩略图 false:否,下载原文件 若该参数为空,下载原文件 (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
-
uploadChatFileCall
public okhttp3.Call uploadChatFileCall(Boolean restrictAccess, File _file, ApiCallback _callback) throws ApiException Build call for uploadChatFile- 参数:
restrictAccess- 是否限制访问该文件: - true:是。用户需要通过响应 body 中获取的文件访问密钥(share-secret)才能下载该文件 - false:否。表示不限制访问。用户可以直接下载该文件 要使用文件访问限制功能,请联系商务开通 (optional)_file- 文件本地路径 (optional)_callback- Callback for upload/download progress- 返回:
- Call to execute
- 抛出:
ApiException- If fail to serialize the request body object http.response.details
-
uploadChatFile
public EMUploadChatFileResult uploadChatFile(Boolean restrictAccess, File _file) throws ApiException 上传文件 对于附件类型的消息,如图片、语音、视频或其他类型文件,发送消息前需上传文件。文档介绍:https://docs-im-beta.easemob.com/document/server-side/message_download.html#%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6- 参数:
restrictAccess- 是否限制访问该文件: - true:是。用户需要通过响应 body 中获取的文件访问密钥(share-secret)才能下载该文件 - false:否。表示不限制访问。用户可以直接下载该文件 要使用文件访问限制功能,请联系商务开通 (optional)_file- 文件本地路径 (optional)- 返回:
- EMUploadChatFileResult
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
uploadChatFileWithHttpInfo
public ApiResponse<EMUploadChatFileResult> uploadChatFileWithHttpInfo(Boolean restrictAccess, File _file) throws ApiException 上传文件 对于附件类型的消息,如图片、语音、视频或其他类型文件,发送消息前需上传文件。文档介绍:https://docs-im-beta.easemob.com/document/server-side/message_download.html#%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6- 参数:
restrictAccess- 是否限制访问该文件: - true:是。用户需要通过响应 body 中获取的文件访问密钥(share-secret)才能下载该文件 - false:否。表示不限制访问。用户可以直接下载该文件 要使用文件访问限制功能,请联系商务开通 (optional)_file- 文件本地路径 (optional)- 返回:
- ApiResponse<EMUploadChatFileResult>
- 抛出:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body http.response.details
-
uploadChatFileAsync
public okhttp3.Call uploadChatFileAsync(Boolean restrictAccess, File _file, ApiCallback<EMUploadChatFileResult> _callback) throws ApiException 上传文件 (asynchronously) 对于附件类型的消息,如图片、语音、视频或其他类型文件,发送消息前需上传文件。文档介绍:https://docs-im-beta.easemob.com/document/server-side/message_download.html#%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6- 参数:
restrictAccess- 是否限制访问该文件: - true:是。用户需要通过响应 body 中获取的文件访问密钥(share-secret)才能下载该文件 - false:否。表示不限制访问。用户可以直接下载该文件 要使用文件访问限制功能,请联系商务开通 (optional)_file- 文件本地路径 (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
-