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

26 lines
583 B

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