13 releases
Uses old Rust 2015
0.1.9-2 | Jun 28, 2017 |
---|---|
0.1.8 | Jun 28, 2017 |
0.1.2 | May 26, 2017 |
#6 in #backblaze
34 downloads per month
Used in rdedup-lib
94KB
1.5K
SLoC
backblaze-b2-rs
Rust library for using the backblaze b2 api. See here for more information. See here for documentation.
The backblaze api requires https, so you need to provide a Client with a https connector. Such a client can be created with the api call below:
extern crate hyper;
extern crate hyper_native_tls;
use hyper::Client;
use hyper::net::HttpsConnector;
use hyper_native_tls::NativeTlsClient;
let ssl = NativeTlsClient::new().unwrap();
let connector = HttpsConnector::new(ssl);
let client = Client::with_connector(connector);
Unfortunately because of the hyper api design, the upload functionality in this library requires the connector instead of the client, and since the client consumes the connector, you'll have to make two of them.
lib.rs
:
The backblaze api requires https, so you need to provide a Client with a https connector.
Such a client can be created with the api call below:
extern crate hyper;
extern crate hyper_native_tls;
use hyper::Client;
use hyper::net::HttpsConnector;
use hyper_native_tls::NativeTlsClient;
let ssl = NativeTlsClient::new().unwrap();
let connector = HttpsConnector::new(ssl);
let client = Client::with_connector(connector);
Unfortunately because of the hyper api design, the upload functionality in this library requires the connector instead of the client, and since the client consumes the connector, you'll have to make two of them.
See the raw module documentation for more information on using this crate.
Currently this library is used through the raw module. This module simply supplies a function for each api call. Another module for easier usage is planned.
Dependencies
~4.5–5.5MB
~139K SLoC