qbittorrent_web_api/qbittorrent-web-api-gen/tests/logout.rs

18 lines
380 B
Rust
Raw Normal View History

2022-07-10 17:06:19 +02:00
use anyhow::Result;
use qbittorrent_web_api_gen::QBittorrentApiGen;
2022-07-10 17:06:19 +02:00
const USERNAME: &str = "admin";
const PASSWORD: &str = "adminadmin";
const BASE_URL: &str = "http://localhost:8080";
#[derive(QBittorrentApiGen)]
struct Api {}
#[tokio::main]
async fn main() -> Result<()> {
let api = Api::login(BASE_URL, USERNAME, PASSWORD).await?;
api.logout().await?;
Ok(())
}