2022-07-14 13:16:03 +02:00
|
|
|
mod common;
|
|
|
|
|
2022-07-10 17:06:19 +02:00
|
|
|
use anyhow::Result;
|
2022-07-14 13:16:03 +02:00
|
|
|
use common::*;
|
2022-07-10 18:32:55 +02:00
|
|
|
use qbittorrent_web_api_gen::QBittorrentApiGen;
|
2022-07-10 17:06:19 +02:00
|
|
|
|
|
|
|
#[derive(QBittorrentApiGen)]
|
|
|
|
struct Api {}
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> Result<()> {
|
|
|
|
let api = Api::login(BASE_URL, USERNAME, PASSWORD).await?;
|
|
|
|
|
|
|
|
let _ = api
|
|
|
|
.log()
|
|
|
|
.main()
|
|
|
|
.normal(true)
|
|
|
|
.info(false)
|
|
|
|
.warning(true)
|
|
|
|
.critical(false)
|
|
|
|
.send()
|
|
|
|
.await?;
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|