1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! # arxivis
//!
//! Official Rust SDK for the [Arxivis](https://github.com/v019-Labs/arxivis) document store.
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use arxivis::{ArxivisClient, UploadOptions};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = ArxivisClient::new("http://localhost:8080", "axv_xxxx_yyyy")?;
//!
//! // Upload a file
//! let data = std::fs::read("invoice.pdf")?;
//! let record = client
//! .upload(
//! data,
//! "invoice.pdf",
//! UploadOptions::new()
//! .path("/invoices/2024/")
//! .tags(vec!["cliente".into(), "enero".into()]),
//! )
//! .await?;
//! println!("stored: {} ({} bytes)", record.id, record.size);
//!
//! // List files
//! let result = client.list("/invoices/2024/", Default::default()).await?;
//! for f in &result.files {
//! println!("{}", f.original_name);
//! }
//!
//! // Download
//! let bytes = client.download(&record.id).await?;
//! std::fs::write("copy.pdf", &bytes)?;
//!
//! // Delete
//! client.delete_file(&record.id).await?;
//!
//! Ok(())
//! }
//! ```
pub use ArxivisClient;
pub use ArxivisError;
pub use ;