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

Download history 5/week @ 2023-12-15 2/week @ 2023-12-22 1/week @ 2024-01-05 2/week @ 2024-02-09 22/week @ 2024-02-16 36/week @ 2024-02-23 20/week @ 2024-03-01 26/week @ 2024-03-08 35/week @ 2024-03-15 30/week @ 2024-03-22 36/week @ 2024-03-29

130 downloads per month
Used in rdedup-lib

MIT license

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

~6MB
~152K SLoC