mangadex_api/v5/
rating.rs

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