chiark / gitweb /
Fill in some more parts of the main structures
authorSimon Tatham <anakin@pobox.com>
Sat, 23 Dec 2023 10:16:46 +0000 (10:16 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 23 Dec 2023 10:16:46 +0000 (10:16 +0000)
src/main.rs

index bb334a8a358a735e772d870b1fcb965a35572d4d..caf9c6a699f82ac444a062375779f1f55d738b6b 100644 (file)
@@ -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<String>, // 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<AccountField>,
+    fields: Vec<AccountField>,
     // emojis: Vec<Emoji>,
     bot: bool,
     group: bool,
@@ -32,6 +39,12 @@ struct Account {
     following_count: u64,
 }
 
+#[derive(Serialize, Deserialize, Debug)]
+struct Application {
+    name: String,
+    website: Option<String>,
+}
+
 #[derive(Serialize, Deserialize, Debug)]
 struct Status {
     id: String,
@@ -43,7 +56,7 @@ struct Status {
     sensitive: bool,
     spoiler_text: String,
     // media_attachments: Vec<Media>,
-    // application: optional Application,
+    application: Option<Application>,
     // mentions: Vec<Mention>,
     // tags: Vec<Hashtag>,
     // emojis: Vec<Emoji>,