Crates.io | one_doc |
lib.rs | one_doc |
version | 0.1.1 |
source | src |
created_at | 2024-02-13 19:43:32.217926 |
updated_at | 2024-02-13 19:43:32.217926 |
description | Rust API bindings - one_doc |
homepage | |
repository | |
max_upload_size | |
id | 1138854 |
size | 34,593 |
Onedoc is the document API for developers.
use one_doc::SidekoClient;
let client = SidekoClient::default().with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
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.
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()
},
});
This endpoint creates a bucket for the html and all specified assets. It returns signed urls to the buckets.
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()
},
});