mangadex_api/v5/
captcha.rs

1//! CAPTCHA endpoint handler.
2//!
3//! <https://api.mangadex.org/swagger.html#/Captcha>
4
5pub mod solve;
6
7use crate::v5::captcha::solve::SolveEndpoint;
8use crate::HttpClientRef;
9
10/// CAPTCHA endpoint handler builder.
11#[derive(Debug)]
12pub struct CaptchaBuilder {
13    http_client: HttpClientRef,
14}
15
16impl CaptchaBuilder {
17    #[doc(hidden)]
18    pub(crate) fn new(http_client: HttpClientRef) -> Self {
19        Self { http_client }
20    }
21
22    /// Solve a CAPTCHA challenge.
23    ///
24    /// <https://api.mangadex.org/swagger.html#/Captcha/post-captcha-solve>
25    pub fn solve(&self) -> SolveEndpoint {
26        SolveEndpoint::new(self.http_client.clone())
27    }
28}