Go to file
2022-11-03 15:18:15 +01:00
.devcontainer Fix typos 2022-07-17 11:26:41 +00:00
.github Update ci 2022-08-13 18:15:51 +00:00
qbittorrent-web-api-gen Fix arguments in add_trackers method 2022-11-03 15:18:15 +01:00
src Refactor project to two crates for easier publishing. 2022-07-10 16:32:55 +00:00
.gitignore Remove cargo.lock 2022-08-13 18:15:43 +00:00
bors.toml Also check pr_status 2022-07-11 15:27:20 +00:00
Cargo.toml Create release 0.6.4 2022-08-13 19:20:07 +00:00
LICENSE Initial commit 2022-07-10 17:00:13 +02:00
README.md Update repo url 2022-08-05 20:20:21 +00:00

qBittorrent web api for Rust

This is an automatic async implementation of the qBittorrent 4.1 web api. The api generation is based on a forked wiki markdown file describing the api which can be found here and the original here.

Example

use anyhow::Result;
use qbittorrent_web_api::Api;

#[tokio::main]
async fn main() -> Result<()> {
    let api = Api::login("http://localhost:8080", "admin", "adminadmin").await?;

    // add a torrent
    api.torrent_management()
        .add("http://www.legittorrents.info/download.php?id=5cc013e801095be61d768e609e3039da58616fd0&f=Oddepoxy%20-%20Oddepoxy%20(2013)%20[OGG%20320%20CBR].torrent")
        .send()
        .await?;

    // critical logs
    let logs = api.log()
        .main()
        .critical(true)
        .warning(false)
        .normal(false)
        .info(false)
        .send()
        .await?;

    println!("{:#?}", logs);

    // current torrent info
    let info = api.torrent_management().info().send().await?;

    println!("{:#?}", info);

    Ok(())
}