mastodon API rust lib elefren, fixed and updated. and also all ASYNC! NB. most examples are now wrong.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
elefren-fork/src/entities/notification.rs

25 lines
583 B

use chrono::prelude::*;
use super::account::Account;
use super::status::Status;
#[derive(Debug, Clone, Deserialize)]
pub struct Notification {
pub id: u64,
#[serde(rename = "type")]
pub notification_type: NotificationType,
pub created_at: DateTime<Utc>,
pub account: Account,
pub status: Option<Status>,
}
#[derive(Debug, Clone, Deserialize)]
pub enum NotificationType {
#[serde(rename = "mention")]
Mention,
#[serde(rename = "reblog")]
Reblog,
#[serde(rename = "favourite")]
Favourite,
#[serde(rename = "follow")]
Follow,
}