shapir 0.0.8

Unofficial ShareFile REST API SDK
Documentation

SHAPIR Build Status DUB

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:

  1. Open Connection (behind the scene it does more things like authentication).
  2. Obtain the required API Entity using the right method of the Connection.
  3. Perform required operations on the API entity.

Usage

Add this to Cargo.toml

[dependencies]
shapir = "^0.0.8"

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.