rust-dropbox
A convenient tool binding to the Dropbox APIv2,
Now it can operate user_check
,upload(file size below 150 MB)
, move
and download
.
It will handle error messages from Dropbox api.
And there is a async api can be activate by feature non-blocking
.
For use, you need a Dropbox access token
Installation
- Find on crates.io
- Use cargo-edit
How to use
blocking api
- upload
use *
use env;
use ;
let token = var.unwrap;
let mut file = open.unwrap;
let mut buf: = Vec new;
file.read_to_end.unwrap;
let client = new;
let option = new.build;
let res = client.upload;
assert!
- move
use *
use env;
let token = var.unwrap;
let client = new;
let option = new
.allow_ownership_transfer
.allow_shared_folder
.allow_auto_rename
.build;
let res = client.move_file;
assert!
- download
use *
use env;
use ;
let token = var.unwrap;
let client = new;
let res = client.download;
let bytes = res.unwrap;
let mut file = create.unwrap;
file.write_all.unwrap;
To use non-blocking api
={=*,=false,=["non-blocking"]}