mangadex_api/v5/
scanlation_group.rs

1//! Scanlation group endpoint handler.
2//!
3//! <https://api.mangadex.org/docs/swagger.html#/ScanlationGroup>
4
5pub mod get;
6pub mod id;
7pub mod post;
8
9use get::ListGroupBuilder;
10use id::IdEndpoint;
11use post::CreateGroupBuilder;
12use uuid::Uuid;
13
14use crate::HttpClientRef;
15
16/// Scanlation group endpoint handler builder.
17#[derive(Debug)]
18pub struct ScanlationGroupBuilder {
19    http_client: HttpClientRef,
20}
21
22impl ScanlationGroupBuilder {
23    #[doc(hidden)]
24    pub(crate) fn new(http_client: HttpClientRef) -> Self {
25        Self { http_client }
26    }
27    pub fn get(&self) -> ListGroupBuilder {
28        ListGroupBuilder::default().http_client(self.http_client.clone())
29    }
30    pub fn post(&self) -> CreateGroupBuilder {
31        CreateGroupBuilder::default().http_client(self.http_client.clone())
32    }
33    pub fn id(&self, id: Uuid) -> IdEndpoint {
34        IdEndpoint::new(self.http_client.clone(), id)
35    }
36}