mangadex_api/v5/
author.rs1pub mod get;
6pub mod id;
7pub mod post;
8
9use uuid::Uuid;
10
11use crate::v5::author::get::ListAuthorBuilder;
12
13use crate::HttpClientRef;
14
15use self::post::CreateAuthorBuilder;
16
17use self::id::IdEndpoint;
18
19#[derive(Debug)]
21pub struct AuthorBuilder {
22 http_client: HttpClientRef,
23}
24
25impl AuthorBuilder {
26 #[doc(hidden)]
27 pub(crate) fn new(http_client: HttpClientRef) -> Self {
28 Self { http_client }
29 }
30
31 pub fn get(&self) -> ListAuthorBuilder {
33 ListAuthorBuilder::default().http_client(self.http_client.clone())
34 }
35 pub fn post(&self) -> CreateAuthorBuilder {
39 CreateAuthorBuilder::default().http_client(self.http_client.clone())
40 }
41
42 pub fn id(&self, id: Uuid) -> IdEndpoint {
44 IdEndpoint::new(self.http_client.clone(), id)
45 }
46}