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.
time
- Specify this to use Chrono for the timestamps instead of integersCargo.toml:
toml
[dependencies]
mangadex-api = "0.1"
```rust use mangadex_api::v2::{responses::ResponseType, MangaDexV2};
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(())
} ```
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.