Crate qbit

Crate qbit 

Source
Expand description

§Qbittorrent Web API wrapper

This module provides a wrapper around the Qbit Web API, enabling interaction with the API through a structured and type-safe interface.

The wrapper includes functionality for managing authentication states, handling credentials, and interacting with various API endpoints.

The library is designed to support Qbittorrent version 5.1

§Example

Basic usage to get all torrents

use qbit::{Api, Credentials};

#[tokio::main]
async fn main() {
    let credentials = Credentials::new("username", "password");
    let client = Api::new_login("http://qBittorrent.server:6969", credentials)
        .await
        .unwrap();

    let torrents = client.torrents(None).await.unwrap();

    for torrent in torrents {
        println!("{:?}", torrent);
    }
}

Modules§

models
Data object models.
parameters
Parameter objects.

Structs§

Api
Represents a client for interacting with a remote API, handling HTTP requests.
Credentials
The Credentials struct represents a user’s login credentials.

Enums§

Error
Error that can occur.
LoginState
Login state