shindan_maker/lib.rs
1/*!
2[![GitHub]](https://github.com/araea/shindan-maker) [![crates-io]](https://crates.io/crates/shindan-maker) [![docs-rs]](crate)
3
4[GitHub]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
5[crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
6[docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
7
8<br>
9
10A Rust library for interacting with [ShindanMaker].
11*/
12
13pub mod client;
14pub mod domain;
15mod internal;
16
17#[cfg(feature = "segments")]
18pub mod models;
19
20// Re-exports for convenient access
21pub use client::ShindanClient;
22pub use domain::ShindanDomain;
23
24#[cfg(feature = "segments")]
25pub use models::{Segment, Segments};
26
27#[cfg(test)]
28mod tests {
29 use super::*;
30 use tokio;
31
32 #[tokio::test]
33 async fn test_get_title() {
34 let client = ShindanClient::new(ShindanDomain::En).unwrap();
35 let (title, _) = client.get_title_with_description("1222992").await.unwrap();
36 assert_eq!("Fantasy Stats", title);
37 }
38}