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/status.rs

48 lines
1.1 KiB

8 years ago
use chrono::prelude::*;
use super::prelude::*;
use status_builder::Visibility;
#[derive(Debug, Clone, Deserialize)]
8 years ago
pub struct Status {
pub id: i64,
pub uri: String,
pub url: String,
pub account: Account,
pub in_reply_to_id: Option<u64>,
pub in_reply_to_account_id: Option<u64>,
pub reblog: Option<Box<Status>>,
pub content: String,
pub created_at: DateTime<UTC>,
pub reblogs_count: u64,
pub favourites_count: u64,
pub reblogged: bool,
pub favourited: bool,
pub sensitive: bool,
pub spoiler_text: String,
pub visibility: Visibility,
pub media_attachments: Vec<Attachment>,
pub mentions: Vec<Mention>,
pub tags: Vec<Tag>,
pub application: Application,
}
#[derive(Debug, Clone, Deserialize)]
8 years ago
pub struct Mention {
pub url: String,
pub username: String,
pub acct: String,
pub id: u64,
}
#[derive(Debug, Clone, Deserialize)]
8 years ago
pub struct Tag {
pub name: String,
pub url: String,
}
#[derive(Debug, Clone, Deserialize)]
8 years ago
pub struct Application {
pub name: String,
pub website: String,
}