Dropbox for Rust
Unofficial Dropbox API SDK for Rust
This crate provides a simple and idiomatic Rust interface to interact with the Dropbox API. It supports common Dropbox operations such as file uploads, downloads, and handling OAuth2 tokens. This SDK is asynchronous and integrates well with Rust's async ecosystem, utilizing tokio.
Features
- Partial support for Dropbox API v2, planned full support.
- Token authentication.
- Async and sync API calls.
Supported Endpoints
The following Dropbox API categories have support in the SDK:
accountauthcheckcontactsfile_propertiesfile_requests
Planned:
files,sharing,users
Full support for all Dropbox API endpoints is coming soon!
Installation
Add the following to your Cargo.toml:
[]
= "0.1"
= { = "1", = ["full"] }
Usage
Here's a basic example showing how to revoke an OAuth2 token.
Sync Example
use api;
use Service;
Async Example
use api;
use tokio;
async
Advanced Usage
Here’s an advanced example of creating a file request using Dropbox API:
use ;
use Service;
use DateTime;
async
Running Tests
To run integration tests, use the following command:
To run local tests, use following commands:
Contributing
This is an unofficial release of the Dropbox API SDK for Rust. Contributions and issues are welcome. Please follow the standard GitHub flow for contributions.
License
This project is licensed under the GNU General Public License v3.0