From: Simon Tatham Date: Sat, 23 Dec 2023 10:16:46 +0000 (+0000) Subject: Fill in some more parts of the main structures X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=3609feda53500b7eb0bb7a8db333a0c6b44580ad;p=mastodonochrome.git Fill in some more parts of the main structures --- diff --git a/src/main.rs b/src/main.rs index bb334a8..caf9c6a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,13 @@ use serde_json::Result; use std::boxed::Box; use std::option::Option; +#[derive(Serialize, Deserialize, Debug)] +struct AccountField { + name: String, + value: String, + verified_at: Option, // FIXME: date +} + #[derive(Serialize, Deserialize, Debug)] struct Account { id: String, @@ -16,7 +23,7 @@ struct Account { header: String, header_static: String, locked: bool, - // fields: Vec, + fields: Vec, // emojis: Vec, bot: bool, group: bool, @@ -32,6 +39,12 @@ struct Account { following_count: u64, } +#[derive(Serialize, Deserialize, Debug)] +struct Application { + name: String, + website: Option, +} + #[derive(Serialize, Deserialize, Debug)] struct Status { id: String, @@ -43,7 +56,7 @@ struct Status { sensitive: bool, spoiler_text: String, // media_attachments: Vec, - // application: optional Application, + application: Option, // mentions: Vec, // tags: Vec, // emojis: Vec,