mastodon_api\models/
instance.rs

1use serde::{Deserialize, Serialize};
2
3/// Represents weekly usage statistics for an instance.
4#[derive(Debug, Clone, Deserialize, Serialize)]
5pub struct Activity {
6    /// The start of the week (Unix timestamp).
7    pub week: String,
8    /// The number of statuses published during the week.
9    pub statuses: String,
10    /// The number of logins during the week.
11    pub logins: String,
12    /// The number of new registrations during the week.
13    pub registrations: String,
14}
15
16/// Represents a formal rule established by the server.
17#[derive(Debug, Clone, Deserialize, Serialize)]
18pub struct Rule {
19    /// The ID of the rule.
20    pub id: String,
21    /// The text of the rule.
22    pub text: String,
23}
24
25/// Metadata about a Mastodon instance.
26#[derive(Debug, Clone, Deserialize, Serialize)]
27pub struct Instance {
28    /// The domain name of the instance.
29    pub uri: String,
30    /// The title of the instance.
31    pub title: String,
32    /// A shorter description of the instance.
33    pub description: String,
34    /// The administrative contact email for the instance.
35    pub email: String,
36    /// The version of Mastodon installed on the instance.
37    pub version: String,
38}