qbit-api-rs

GitHub release (release name instead of tag name) Rust Static Badge GitHub Repo stars

A asynchronous Rust wrapper for qBittorrent Web API (For version above 4.1).

Usage

add dependency

toml [dependencies] qbit-api-rs = "0.1"

or

sh cargo add qbit-api-rs

usage

```rust use qbitapirs::client::QbitClient;

[tokio::main]

async fn main() -> Result<(), Box> { // initialize client with given username and password let client = QbitClient::newwithuserpwd("http://hostname:port", "admin", "adminadmin").unwrap(); // or from environment variable // QBITHOST, QBITUSERNAME, QBITPASSWORD must be set let client = QbitClient::newfromenv().unwrap();

// login first
client.auth_login().await?;

// call api methods
let v = client.app_version().await?;
println!("{}", v);

//...
Ok(())

} ```

For more usage, please refer to examples.

Note

Supported APIs

Authentication

Application

Log

Sync

Transfer info

Torrent management

RSS (experimental)

Search

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.