pub struct DocumentService { /* private fields */ }Expand description
文档服务
Implementations§
Source§impl DocumentService
impl DocumentService
pub fn new(config: Config) -> Self
Sourcepub async fn create(
&self,
request: CreateDocumentRequest,
option: Option<RequestOption>,
) -> SDKResult<BaseResponse<CreateDocumentRespData>>
pub async fn create( &self, request: CreateDocumentRequest, option: Option<RequestOption>, ) -> SDKResult<BaseResponse<CreateDocumentRespData>>
Sourcepub async fn get(
&self,
document_id: impl Into<String>,
option: Option<RequestOption>,
) -> SDKResult<BaseResponse<GetDocumentRespData>>
pub async fn get( &self, document_id: impl Into<String>, option: Option<RequestOption>, ) -> SDKResult<BaseResponse<GetDocumentRespData>>
Sourcepub async fn get_raw_content(
&self,
document_id: impl Into<String>,
option: Option<RequestOption>,
) -> SDKResult<BaseResponse<GetRawContentRespData>>
pub async fn get_raw_content( &self, document_id: impl Into<String>, option: Option<RequestOption>, ) -> SDKResult<BaseResponse<GetRawContentRespData>>
获取文档纯文本内容
该接口用于获取文档的纯文本内容。
https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document/raw_content
Sourcepub async fn list_blocks(
&self,
request: ListDocumentBlocksRequest,
option: Option<RequestOption>,
) -> SDKResult<BaseResponse<ListDocumentBlocksRespData>>
pub async fn list_blocks( &self, request: ListDocumentBlocksRequest, option: Option<RequestOption>, ) -> SDKResult<BaseResponse<ListDocumentBlocksRespData>>
Sourcepub async fn convert_to_docx(
&self,
document_id: impl Into<String>,
option: Option<RequestOption>,
) -> SDKResult<BaseResponse<ConvertToDocxRespData>>
pub async fn convert_to_docx( &self, document_id: impl Into<String>, option: Option<RequestOption>, ) -> SDKResult<BaseResponse<ConvertToDocxRespData>>
转换为文档块
该接口用于将旧版文档转换为新版文档块格式。
https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/convert
Trait Implementations§
Source§impl ExecutableBuilder<DocumentService, CreateDocumentRequest, BaseResponse<CreateDocumentRespData>> for CreateDocumentRequestBuilder
impl ExecutableBuilder<DocumentService, CreateDocumentRequest, BaseResponse<CreateDocumentRespData>> for CreateDocumentRequestBuilder
Source§fn build(self) -> CreateDocumentRequest
fn build(self) -> CreateDocumentRequest
构建请求对象
Source§fn execute<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<CreateDocumentRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<CreateDocumentRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
执行请求并返回响应
Source§fn execute_with_options<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
option: RequestOption,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<CreateDocumentRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_with_options<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
option: RequestOption,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<CreateDocumentRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
带选项执行请求
Source§impl ExecutableBuilder<DocumentService, ListDocumentBlocksRequest, BaseResponse<ListDocumentBlocksRespData>> for ListDocumentBlocksRequestBuilder
impl ExecutableBuilder<DocumentService, ListDocumentBlocksRequest, BaseResponse<ListDocumentBlocksRespData>> for ListDocumentBlocksRequestBuilder
Source§fn build(self) -> ListDocumentBlocksRequest
fn build(self) -> ListDocumentBlocksRequest
构建请求对象
Source§fn execute<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<ListDocumentBlocksRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<ListDocumentBlocksRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
执行请求并返回响应
Source§fn execute_with_options<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
option: RequestOption,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<ListDocumentBlocksRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_with_options<'life0, 'async_trait>(
self,
service: &'life0 DocumentService,
option: RequestOption,
) -> Pin<Box<dyn Future<Output = SDKResult<BaseResponse<ListDocumentBlocksRespData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
带选项执行请求
Auto Trait Implementations§
impl Freeze for DocumentService
impl !RefUnwindSafe for DocumentService
impl Send for DocumentService
impl Sync for DocumentService
impl Unpin for DocumentService
impl !UnwindSafe for DocumentService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more