MangaDex API

Unofficial Rust client for the MangaDex API.

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.

Documentation (main branch)

Table of Contents

Requirements

Back to top

How to install

Add mangadex-api to your dependencies:

```toml [dependencies]

...

mangadex-api = "1.0.0-alpha.0" ```

If you are using cargo-edit, run

bash cargo add mangadex-api

Features

All features are not included by default. To enable them, add any of the following to your project's Cargo.toml file.

For example, to enable the upload feature, add the following to your Cargo.toml file:

toml mangadex-api = { version = "1.0.0-alpha.0", features = ["upload"] }

Downloading Cover Images

  1. Get the list of covers from the cover list endpoint.
  2. Download the desired image from https://uploads.mangadex.org using the following format: https://uploads.mangadex.org/:mangaId/:fileName.

Examples

Back to top

```rust use mangadex_api::v5::MangaDexClient;

[tokio::main]

async fn main() -> anyhow::Result<()> { let client = MangaDexClient::default();

let random_manga = client
    .manga()
    .random()
    .build()?
    .send()
    .await?;

println!("{:?}", random_manga);

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.