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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//! Unofficial Dropbox HTTP API v2 SDK for Rust.
//!
//! # Quick start
//!
//! ```no_run
//! use rusty_dropbox_sdk::api;
//! use rusty_dropbox_sdk::api::Service;
//!
//! # async fn run() -> anyhow::Result<()> {
//! let token = std::env::var("DROPBOX_TOKEN")?;
//! let client = rusty_dropbox_sdk::Client::new(token);
//! let bearer = client.token();
//! let req = api::files::list_folder::ListFolderRequest {
//! access_token: &bearer,
//! payload: Some(api::files::ListFolderArgs {
//! path: String::new(),
//! recursive: Some(false),
//! include_media_info: None,
//! include_deleted: None,
//! include_has_explicit_shared_members: None,
//! include_mounted_folders: None,
//! limit: Some(50),
//! shared_link: None,
//! include_property_groups: None,
//! include_non_downloadable_files: None,
//! }),
//! };
//! let result = req.call().await?;
//! println!("{:?}", result);
//! # Ok(())
//! # }
//! ```
//!
//! # Organisation
//!
//! - [`api`] — request/response types grouped by Dropbox namespace
//! (`account`, `auth`, `check`, `contacts`, `file_properties`,
//! `file_requests`, `files`). Each endpoint has its own submodule
//! with a `*Request` struct you build and call.
//! - Every request implements the [`Service`](api::Service) trait which
//! exposes both `call()` (async) and `call_sync()` (blocking) methods.
//!
//! # Reference
//!
//! Dropbox HTTP API docs: <https://www.dropbox.com/developers/documentation/http/documentation>
pub use ;
pub use TypedError;
/// Ergonomic re-exports. `use rusty_dropbox_sdk::prelude::*;` brings in the
/// `Service` trait (so `request.call().await?` resolves), the `Client`
/// token holder, and the `files` namespace.
static TEST_AUTH_TOKEN: &str = "12345";
use ;
use ;
// `use anyhow;` is intentional: it exposes `crate::anyhow` to dozens of
// `src/models/**/*.rs` files which import `Result` via `crate::anyhow::Result`.
use ;
/// User-Agent advertised on every request. Lets Dropbox support trace traffic
/// from this SDK and lets you bump the version when filing issues against them.
pub const USER_AGENT: &str = concat!;
// Clients
lazy_static!