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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use crate::{Country, Followers, Image, SubscriptionLevel, UserId};
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
pub struct PublicUser {
pub display_name: Option<String>,
pub external_urls: HashMap<String, String>,
pub followers: Option<Followers>,
pub href: String,
pub id: UserId,
#[serde(default = "Vec::new")]
pub images: Vec<Image>,
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
pub struct PrivateUser {
pub country: Option<Country>,
pub display_name: Option<String>,
pub email: Option<String>,
pub external_urls: HashMap<String, String>,
pub explicit_content: Option<ExplicitContent>,
pub followers: Option<Followers>,
pub href: String,
pub id: UserId,
pub images: Option<Vec<Image>>,
pub product: Option<SubscriptionLevel>,
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Default)]
pub struct ExplicitContent {
pub filter_enabled: bool,
pub filter_locked: bool,
}