Crate nyaa_si

source ·
Expand description

§nyaa-si

Cargo Documentation

An async Nyaa client for Rust.

§Usage

use nyaa_si::{Client, NyaaCategory, NyaaClient, QueryBuilder, Sort};

#[tokio::main]
async fn main() {
    let query = QueryBuilder::new()
        .search("tengoku")
        .sort(Sort::Downloads)
        .category(NyaaCategory::Anime)
        .build();

    let client = NyaaClient::new();
    let res = client.get(&query).await.unwrap();
    println!("{:#?}", res.get(0).unwrap());
}

Re-exports§

Modules§

  • common traits for category
  • common traits for api client
  • nyaa errors
  • type definitions for api response
  • nyaa-specific query and client
  • query params
  • sukebei-specific query and client