meztide/api_models/
community.rs1use serde::Deserialize;
2
3use crate::ids::CommunityId;
4
5use super::Content;
6
7#[derive(Debug, Deserialize)]
8pub struct YourFollowInfo {
9 pub accepted: bool,
11}
12
13#[derive(Debug, Deserialize)]
14pub struct CommunityFeedsType {
15 pub new: Box<str>,
16}
17
18#[derive(Debug, Deserialize)]
19pub struct CommunityFeeds {
20 pub atom: CommunityFeedsType,
21}
22
23#[derive(Debug, Deserialize)]
25pub struct CommunityInfo {
26 #[serde(flatten)]
27 pub base: MinimalCommunityInfo,
28
29 pub description: Content,
30 pub feeds: CommunityFeeds,
31
32 pub you_are_moderator: Option<bool>,
33 pub your_follow: Option<YourFollowInfo>,
34
35 pub pending_moderation_actions: Option<u32>,
38}
39
40#[derive(Debug, Deserialize)]
42pub struct MinimalCommunityInfo {
43 pub id: CommunityId,
44 pub name: Box<str>,
45 pub local: bool,
46 pub host: Box<str>,
47 pub remote_url: Option<Box<str>>,
48 pub deleted: bool,
49}