imgurs/src/api/image_type.rs

28 lines
646 B
Rust
Raw Normal View History

2022-01-23 12:05:32 +00:00
use serde_derive::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone)]
2022-01-23 12:05:32 +00:00
pub struct ImageInfo {
pub data: ImageInfoData,
2022-01-24 22:15:55 +00:00
pub success: bool,
pub status: i32,
2022-01-23 12:05:32 +00:00
}
#[derive(Debug, Serialize, Deserialize, Clone)]
2022-01-23 12:05:32 +00:00
pub struct ImageInfoData {
pub id: String,
pub title: Option<String>,
pub description: Option<String>,
pub datetime: i32,
#[serde(rename = "type")]
pub img_type: String,
pub animated: bool,
pub width: i32,
pub height: i32,
pub size: i32,
pub views: i32,
pub bandwidth: i64,
pub favorite: bool,
pub deletehash: Option<String>,
pub link: String,
}