mastodon API rust lib elefren, fixed and updated. and also all ASYNC! NB. most examples are now wrong.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
elefren-fork/src/entities/attachment.rs

20 lines
434 B

#[derive(Debug, Clone, Deserialize)]
pub struct Attachment {
pub id: u64,
#[serde(rename="type")]
pub media_type: MediaType,
pub url: String,
pub remote_url: String,
pub preview_url: String,
pub text_url: String,
}
#[derive(Debug, Deserialize, Clone, Copy)]
pub enum MediaType {
#[serde(rename = "image")]
Image,
#[serde(rename = "video")]
Video,
#[serde(rename = "gifv")]
Gifv,
}