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

20 lines
505 B
Rust
Raw Normal View History

2022-07-14 13:16:03 +02:00
mod common;
2022-07-14 12:30:31 +02:00
use anyhow::Result;
2022-07-14 13:16:03 +02:00
use common::*;
2022-07-14 12:30:31 +02:00
use qbittorrent_web_api_gen::QBittorrentApiGen;
#[derive(QBittorrentApiGen)]
struct Api {}
#[tokio::main]
async fn main() -> Result<()> {
let api = Api::login(BASE_URL, USERNAME, PASSWORD).await?;
2022-08-06 03:43:44 +02:00
let _ = api.search().delete(1).await?;
2022-07-14 12:30:31 +02:00
let _ = api.search().plugins().await?;
2022-08-06 03:43:44 +02:00
let _ = api.search().install_plugin(&["https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py"]).await?;
2022-07-14 12:30:31 +02:00
Ok(())
}