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.
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
All features are not included by default. To enable them, add any of the following to your project's Cargo.toml
file.
upload
- Enable endpoints that upload files to MangaDex.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"] }
https://uploads.mangadex.org
using the following format: https://uploads.mangadex.org/:mangaId/:fileName
.```rust use mangadex_api::v5::MangaDexClient;
async fn main() -> anyhow::Result<()> { let client = MangaDexClient::default();
let random_manga = client
.manga()
.random()
.build()?
.send()
.await?;
println!("{:?}", random_manga);
Ok(())
} ```
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.
The changelog can be found here.
Changes are added manually to keep the changelog human-readable with summaries of the changes from each version.
Licensed under either of
at your option.
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.
We welcome contributions from everyone. There are many ways to contribute and the CONTRIBUTING.md document explains how you can contribute and get started.