FileApi

Trait FileApi 

Source
pub trait FileApi {
    // Required methods
    fn upload_work_item_file(
        &self,
        request: UploadWorkItemFileRequest,
        auth: AuthType,
    ) -> impl Future<Output = ApiResult<UploadWorkItemFileResponse>> + Send;
    fn upload_file(
        &self,
        request: UploadFileRequest,
        auth: AuthType,
    ) -> impl Future<Output = ApiResult<UploadFileResponse>> + Send;
    fn download_work_item_file(
        &self,
        request: DownloadWorkItemFileRequest,
        auth: AuthType,
    ) -> impl Future<Output = ApiResult<DownloadWorkItemFileResponse>> + Send;
    fn delete_file(
        &self,
        request: DeleteFileRequest,
        auth: AuthType,
    ) -> impl Future<Output = ApiResult<DeleteFileResponse>> + Send;
}

Required Methods§

Source

fn upload_work_item_file( &self, request: UploadWorkItemFileRequest, auth: AuthType, ) -> impl Future<Output = ApiResult<UploadWorkItemFileResponse>> + Send

添加附件 该接口用于在指定工作项的一个“附件类型“字段中添加附件,对应的插件应用效果可参考上传附件。

Source

fn upload_file( &self, request: UploadFileRequest, auth: AuthType, ) -> impl Future<Output = ApiResult<UploadFileResponse>> + Send

上传文件或富文本图片 该接口为通用的文件上传接口,会返回上传后的资源路径,主要用于富文本中上传图片。

Source

fn download_work_item_file( &self, request: DownloadWorkItemFileRequest, auth: AuthType, ) -> impl Future<Output = ApiResult<DownloadWorkItemFileResponse>> + Send

下载附件 该接口用于下载一个工作项下的指定附件。

Source

fn delete_file( &self, request: DeleteFileRequest, auth: AuthType, ) -> impl Future<Output = ApiResult<DeleteFileResponse>> + Send

删除附件 该接口用于在指定工作项的一个“附件类型“字段中删除附件。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§