18 releases
Uses old Rust 2015
0.5.0 | Oct 23, 2018 |
---|---|
0.4.0 | Jun 4, 2018 |
0.3.1 | Dec 13, 2017 |
0.2.1 | Dec 5, 2016 |
0.0.3 | Mar 26, 2016 |
#998 in HTTP server
94KB
2K
SLoC
SHAPIR
Unofficial ShareFile REST API SDK for Rust.
First things first
To work with ShareFile REST API you should register you appliction first. Please follow instructions from the official documentation to obtain API key.
SDK design
The SDK follows the composition of API Entities of the REST API. So for example to access Items functionality you should obtain instance of that API Entity using method items()
of the connection opened.
The workflow of the SDK usage looks like this:
- Open
Connection
(behind the scene it does more things like authentication). - Obtain the required API Entity using the right method of the
Connection
. - Perform required operations on the API entity.
Usage
Add this to Cargo.toml
[dependencies]
shapir = "0.3"
and this to your crate root:
extern crate shapir;
Example
use shapir::Connection;
let conn = Connection::new()
.subdomain("your-subdomain")
.username("your.username@mail.com")
.password("your-password")
.client_id("client-id")
.client_secret("client-secret")
.connect()
.unwrap();
let items = conn.items();
let files = items.list(Path::Home, None).unwrap();
Contributing
Contributions are always welcome.
Dependencies
~10MB
~199K SLoC