mastodon_api\models/status.rs
1use crate::models::Account;
2use serde::{Deserialize, Serialize};
3
4/// Represents a status (post) on Mastodon.
5#[derive(Debug, Clone, Deserialize, Serialize)]
6pub struct Status {
7 /// The ID of the status.
8 pub id: String,
9 /// The time the status was created (ISO 8601).
10 pub created_at: String,
11 /// ID of the status being replied to, if any.
12 pub in_reply_to_id: Option<String>,
13 /// ID of the account being replied to, if any.
14 pub in_reply_to_account_id: Option<String>,
15 /// Whether the status is marked as sensitive (should be hidden).
16 pub sensitive: bool,
17 /// Text to be shown as a warning before the status content.
18 pub spoiler_text: String,
19 /// Visibility of the status ("public", "unlisted", "private", "direct").
20 pub visibility: String,
21 /// ISO 639 language code for the status.
22 pub language: Option<String>,
23 /// URI of the status used for federation.
24 pub uri: String,
25 /// Public URL of the status.
26 pub url: Option<String>,
27 /// Number of replies to the status.
28 pub replies_count: u64,
29 /// Number of reblogs (boosts) for the status.
30 pub reblogs_count: u64,
31 /// Number of favourites (likes) for the status.
32 pub favourites_count: u64,
33 /// HTML content of the status.
34 pub content: String,
35 /// The account that created the status.
36 pub account: Account,
37}