diff --git a/src/imgur/album_type.rs b/src/imgur/album_type.rs index 7d2023f..5847b37 100644 --- a/src/imgur/album_type.rs +++ b/src/imgur/album_type.rs @@ -18,7 +18,7 @@ pub struct AlbumInfoData { /// Album ID pub id: String, /// Title of the album - pub title: String, + pub title: Option, /// Description of the album pub description: Option, pub datetime: i64, @@ -27,7 +27,7 @@ pub struct AlbumInfoData { pub cover_width: i64, pub cover_height: i64, pub account_url: Option, - pub account_id: Option, + pub account_id: Option, pub privacy: String, pub layout: String, pub views: i64, @@ -45,6 +45,13 @@ pub struct AlbumInfoData { pub ad_config: AdConfig, } +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)] +#[serde(untagged)] +pub enum AccountId { + String(String), + Int(i64), +} + #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)] pub struct AdConfig { #[serde(rename = "safeFlags")]