one_doc

Crates.ioone_doc
lib.rsone_doc
version0.1.1
sourcesrc
created_at2024-02-13 19:43:32.217926
updated_at2024-02-13 19:43:32.217926
descriptionRust API bindings - one_doc
homepage
repository
max_upload_size
id1138854
size34,593
Patrick Kelly (pk8189)

documentation

README

one_doc rust

Onedoc is the document API for developers.

Authentication

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.

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.

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()
        },
    });
Commit count: 0

cargo fmt