use serde::{Deserialize, Serialize}; use crate::ImageInfoData; /// Album Info Response #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)] pub struct AlbumInfo { /// Image Data pub data: AlbumInfoData, /// Request processed success or not. pub success: bool, /// HTTP status code from API request. pub status: i32, } #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)] pub struct AlbumInfoData { /// Album ID pub id: String, /// Title of the album pub title: Option, /// Description of the album pub description: Option, pub datetime: i64, pub cover: String, pub cover_edited: Option, pub cover_width: i64, pub cover_height: i64, pub account_url: Option, pub account_id: Option, pub privacy: String, pub layout: String, pub views: i64, /// Album link pub link: String, pub favorite: bool, pub nsfw: bool, pub section: Option, pub images_count: i64, pub in_gallery: bool, pub is_ad: bool, pub include_album_ads: bool, pub is_album: bool, pub images: Vec, 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")] pub safe_flags: Vec, #[serde(rename = "highRiskFlags")] pub high_risk_flags: Vec, #[serde(rename = "unsafeFlags")] pub unsafe_flags: Vec, #[serde(rename = "wallUnsafeFlags")] pub wall_unsafe_flags: Vec, #[serde(rename = "showsAds")] pub shows_ads: bool, #[serde(rename = "showAdLevel")] pub show_ad_level: i64, }