Fix the attributes of Attachment (#5)

* Fix Attachment.text_url not being nullable

* Add missing "unknown" attribute to MediaType, which is not in the documentation by TootSuite

b97ebaf620/app/models/media_attachment.rb (L24)
master
wariuni 8 years ago committed by Aaron Power
parent d1063570f6
commit 34f17ebcc0
  1. 4
      src/entities/attachment.rs

@ -6,7 +6,7 @@ pub struct Attachment {
pub url: String, pub url: String,
pub remote_url: String, pub remote_url: String,
pub preview_url: String, pub preview_url: String,
pub text_url: String, pub text_url: Option<String>,
} }
#[derive(Debug, Deserialize, Clone, Copy)] #[derive(Debug, Deserialize, Clone, Copy)]
@ -17,4 +17,6 @@ pub enum MediaType {
Video, Video,
#[serde(rename = "gifv")] #[serde(rename = "gifv")]
Gifv, Gifv,
#[serde(rename = "unknown")]
Unknown,
} }

Loading…
Cancel
Save