mangadex_api/v5/
at_home.rs

1//! MangaDex@Home endpoint handler.
2//!
3//! <https://api.mangadex.org/swagger.html#/AtHome>
4pub mod server;
5
6use crate::v5::at_home::server::ServerEndPoint;
7use crate::HttpClientRef;
8
9/// MangaDex@Home endpoint handler builder.
10#[derive(Debug)]
11pub struct AtHomeBuilder {
12    http_client: HttpClientRef,
13}
14
15impl AtHomeBuilder {
16    #[doc(hidden)]
17    pub(crate) fn new(http_client: HttpClientRef) -> Self {
18        Self { http_client }
19    }
20
21    /// Get a MangaDex@Home server URL.
22    ///
23    /// <https://api.mangadex.org/swagger.html#/AtHome/get-at-home-server-chapterId>
24    ///
25    /// This can be used to [fetch chapter pages](https://api.mangadex.org/swagger.html#/AtHome/Reading-a-chapter-using-the-API/Retrieving-pages-from-the-MangaDex@Home-network).
26    pub fn server(&self) -> ServerEndPoint {
27        ServerEndPoint::new(self.http_client.clone())
28    }
29}