Crate bangumi

Source
Expand description

§Bangumi

This is a Rust library for the Bangumi.moe API based on rustified.

§Usage

use bangumi::{endpoints::GetCurrent, Endpoint};

let client = bangumi::client();
let result: Vec<WithId<Bangumi>> = GetCurrent.exec(&client).await?.parse()?;

§With builder

use bangumi::{endpoints::SearchTags, Endpoint};

let client = bangumi::client();
let result: SearchResult<Vec<WithId<Tag>>> =
    SearchTags::builder()
        .name("魔法少女")
        .keywords(false)
        .tag_type(TagType::Bangumi)
        .build()
        .exec(&client)
        .await?
        .parse()?;

For all endpoints, see endpoints.

Re-exports§

pub use rustified;

Modules§

endpoints

Structs§

Bangumi
Current
Id
Locale
Name
Record
ReqwestClient
A client based on the reqwest::Client which can be used for executing Endpoints. A backing instance of a reqwest::Client is used to increase performance and to save certain characteristics across sessions. A base URL is required and is used to qualify the full path of any Endpoints which are executed by this client.
Sync
Tag
Team
Torrent
Torrents
WithId

Enums§

Content
Error
SearchResult
TagType

Constants§

DEFAULT_DOMAIN

Traits§

Endpoint
Represents a remote HTTP endpoint which can be executed using a crate::client::Client.

Functions§

client