mangadex_api/v5/scanlation_group/id/
follow.rs1use crate::HttpClientRef;
2
3use uuid::Uuid;
4
5pub mod delete;
6pub mod post;
7
8use delete::UnfollowGroupBuilder;
9use post::FollowGroupBuilder;
10
11#[cfg_attr(
12 feature = "custom_list_v2",
13 deprecated(
14 since = "3.0.0-rc.1",
15 note = "After the introduction of the Subscription system, this endpoint will be removed in v3"
16 )
17)]
18#[derive(Debug)]
19pub struct FollowEndpoint {
20 http_client: HttpClientRef,
21 id: Uuid,
22}
23
24impl FollowEndpoint {
25 #[doc(hidden)]
26 pub fn new(http_client: HttpClientRef, id: Uuid) -> Self {
27 Self { http_client, id }
28 }
29 pub fn post(&self) -> FollowGroupBuilder {
30 FollowGroupBuilder::default()
31 .group_id(self.id)
32 .http_client(self.http_client.clone())
33 }
34 pub fn delete(&self) -> UnfollowGroupBuilder {
35 UnfollowGroupBuilder::default()
36 .group_id(self.id)
37 .http_client(self.http_client.clone())
38 }
39}