mangadex-api 0.1.1

Wrapper around the MangaDex API
Documentation

MangaDex API

Rust wrapper for the MangaDex API. This also includes some conveniences that are not provided from the API directly such as logging in.

Warning: This is still in the early development stage. Some breaking API changes may occur as the project matures. Consequently, this code is not yet ready for use in production.

Table of Contents

Requirements

Back to top

Features

Back to top

Optional Features

Back to top

  • time - Specify this to use Chrono for the timestamps instead of integers

Examples

Back to top

Cargo.toml:

[dependencies]
mangadex-api = "0.1"
use mangadex_api::v2::{responses::ResponseType, MangaDexV2};

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let mangadex_client = MangaDexV2::default();

    let manga  = mangadex_client
        .manga(1)
        .send()
        .await?
        .ok()
        .unwrap();

    // Fields are hidden behind getter methods to prevent field mutation.
    // The getters return a referenced value so comparisons require de-referencing.
    assert_eq!(*manga.data().id(), 1);

    Ok(())
}

Running Examples

Back to top

The examples can be run with the following:

cargo run --example [example_name]

More details about the examples can be found in the examples README file.

Changelog

Back to top

The changelog can be found here.

Changes are added manually to keep the changelog human-readable with summaries of the changes from each version.

License

Back to top

Licensed under either of

at your option.

Contribution

Back to top

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Contributing

Back to top

We welcome contributions from everyone. There are many ways to contribute and the CONTRIBUTING.md document explains how you can contribute and get started.