mangadex_api/v5/
ping.rs

1//! Infrastructure endpoint handler.
2//!
3//! <https://api.mangadex.org/docs/swagger.html#/Infrastructure>
4
5pub mod get;
6
7use get::PingBuilder;
8
9use crate::HttpClientRef;
10
11/// Legacy endpoint handler builder.
12#[derive(Clone, Debug)]
13pub struct PingEndpointBuilder {
14    http_client: HttpClientRef,
15}
16
17impl PingEndpointBuilder {
18    #[doc(hidden)]
19    pub(crate) fn new(http_client: HttpClientRef) -> Self {
20        Self { http_client }
21    }
22
23    /// Ping the server.
24    ///
25    /// <https://api.mangadex.org/docs/swagger.html#/Infrastructure/get_ping>
26    pub fn get(self) -> PingBuilder {
27        PingBuilder::default().http_client(self.http_client)
28    }
29}