mangadex_api/v5/api_client/id/
secret.rs1pub mod get;
2pub mod post;
3
4use crate::HttpClientRef;
5use uuid::Uuid;
6
7use get::GetClientSecretBuilder;
8use post::RegenerateClientSecretBuilder;
9
10create_endpoint_node! {
11 #[name] SecretEndpoint SecretEndpointMethods,
12 #[args] {
13 http_client: HttpClientRef,
14 id: Uuid,
15 },
16 #[methods] {
17 get() -> GetClientSecretBuilder;
18 post() -> RegenerateClientSecretBuilder;
19 }
20}
21
22impl SecretEndpointMethods for SecretEndpoint {
23 fn get(&self) -> GetClientSecretBuilder {
24 GetClientSecretBuilder::default()
25 .client_id(<&Self as Into<Uuid>>::into(self))
26 .http_client(<&Self as Into<HttpClientRef>>::into(self))
27 }
28
29 fn post(&self) -> RegenerateClientSecretBuilder {
30 RegenerateClientSecretBuilder::default()
31 .client_id(<&Self as Into<Uuid>>::into(self))
32 .http_client(<&Self as Into<HttpClientRef>>::into(self))
33 }
34}