Skip to main content

Crate wyzie_subs

Crate wyzie_subs 

Source
Expand description

§wyzie-subs

crates.io Documentation MIT/Apache-2 licensed

A client for downloading subtitles from sub.wyzie.ru.

§Features

  • utoipa-impl - Implements ToSchema on data structures
  • schemars-impl - Implements JsonSchema on data structures

§Usage

use reqwest::Client;
use url::Url;
use wyzie_subs::{WyzieClient, models::SearchParams};

#[tokio::main]
async fn main() {
    let wyzie = WyzieClient::builder()
        .base_url(Url::parse("https://sub.wyzie.ru").unwrap())
        .reqwest_client(Client::new())
        .build();

    let params = SearchParams::builder()
        .id("93740".to_string())
        .season(1)
        .episode(1)
        .key(std::env::var("API_KEY").unwrap())
        .build();

    let subtitles = wyzie.search(&params).await.unwrap();
}

§License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Re-exports§

pub use client::*;

Modules§

client
errors
models