mangadex_api/v5/settings/
template.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
30
31
32
pub mod get;
pub mod post;
pub mod version;

use get::GetLatestSettingsTemplateBuilder;
use post::CreateSettingsTemplateBuilder;
use uuid::Uuid;
use version::SettingsTemplateVersionBuilder;

use crate::HttpClientRef;

#[derive(Debug)]
pub struct SettingsTemplateBuilder {
    #[allow(unused)]
    http_client: HttpClientRef,
}

impl SettingsTemplateBuilder {
    #[doc(hidden)]
    pub(crate) fn new(http_client: HttpClientRef) -> Self {
        Self { http_client }
    }
    pub fn get(&self) -> GetLatestSettingsTemplateBuilder {
        GetLatestSettingsTemplateBuilder::default().http_client(self.http_client.clone())
    }
    pub fn post(&self) -> CreateSettingsTemplateBuilder {
        CreateSettingsTemplateBuilder::default().http_client(self.http_client.clone())
    }
    pub fn version(&self, id: Uuid) -> SettingsTemplateVersionBuilder {
        SettingsTemplateVersionBuilder::new(self.http_client.clone(), id)
    }
}