mangadex_api/v5/
rating.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//! Rating endpoint handler.
//!
//! <https://api.mangadex.org/docs/swagger.html#/Rating/Rating>
pub mod get;
pub mod manga_id;

use crate::HttpClientRef;
use get::GetYourMangaRatingsBuilder;
use manga_id::MangaIdEndpoint;
use uuid::Uuid;

/// Rating endpoint handler builder.
#[derive(Clone, Debug)]
pub struct RatingBuilder {
    http_client: HttpClientRef,
}

impl RatingBuilder {
    #[doc(hidden)]
    pub(crate) fn new(http_client: HttpClientRef) -> Self {
        Self { http_client }
    }
    pub fn get(&self) -> GetYourMangaRatingsBuilder {
        GetYourMangaRatingsBuilder::default().http_client(self.http_client.clone())
    }
    pub fn manga_id(&self, manga_id: Uuid) -> MangaIdEndpoint {
        MangaIdEndpoint::new(self.http_client.clone(), manga_id)
    }
}