# one_doc rust Onedoc is the document API for developers. # Authentication ```rust use one_doc::SidekoClient; let client = SidekoClient::default().with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined")); ``` # post_api_docs_generate This route is responsible for generating a PDF from a bucket. It expects a JSON body with details of the bucket, user credentials, and PDF generation options. ```rust use one_doc::SidekoClient; use one_doc::request_types::*; use one_doc::schemas::*; let client = SidekoClient::default() .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined")); let response = client .post_api_docs_generate(PostApiDocsGenerateRequest { data: PostApiDocsGenerateBody { ..Default::default() }, }); ``` # post_api_docs_initiate This endpoint creates a bucket for the html and all specified assets. It returns signed urls to the buckets. ```rust use one_doc::SidekoClient; use one_doc::request_types::*; use one_doc::schemas::*; let client = SidekoClient::default() .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined")); let response = client .post_api_docs_initiate(PostApiDocsInitiateRequest { data: PostApiDocsInitiateBody { ..Default::default() }, }); ```