summaryrefslogtreecommitdiffstats
path: root/src/entities/status.rs
diff options
context:
space:
mode:
authorAaron Power <theaaronepower@gmail.com>2018-02-12 00:07:59 +0000
committerAaron Power <theaaronepower@gmail.com>2018-02-12 00:09:23 +0000
commit4984dfaacfc5b8e89809d00e863c4b9bd1d3892f (patch)
treeb65c9a2d126e0b1bb3e8918c517f2f04b940ebfc /src/entities/status.rs
parentab1e5f86f03d13d44541f2ccb444877346440392 (diff)
Version 0.10.0-rc1
- Added the ability to handle paged entities like favourites and such. (Only favourites in prerelease) - Added optional `source` and `moved` fields to `Account`. - Added `Source` struct to match with the `Account.source` field. - Added `CredientialsBuilder` struct for updating profile using `verify_credientials`. - Attachment now handles being sent an empty object, which is converted to `None`. - Added ombed data fields to `Card`. - Added `version` and `urls` fields to `Instance`. - Added `id`, `muting_notifications`, and `domain_blocking` to `Relationship`. - Added `emojis`, `language`, and `pinned` fields to `Status` - Added `Emoji` struct. - Added `List` and `Mention` structs(matching routes not added yet). - Added example that prints your profile.
Diffstat (limited to 'src/entities/status.rs')
-rw-r--r--src/entities/status.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/entities/status.rs b/src/entities/status.rs
index fdd9d87..158ba0a 100644
--- a/src/entities/status.rs
+++ b/src/entities/status.rs
@@ -28,6 +28,8 @@ pub struct Status {
pub content: String,
/// The time the status was created.
pub created_at: DateTime<Utc>,
+ /// An array of Emoji
+ pub emojis: Vec<Emoji>,
/// The number of reblogs for the status.
pub reblogs_count: u64,
/// The number of favourites for the status.
@@ -51,6 +53,10 @@ pub struct Status {
pub tags: Vec<Tag>,
/// Name of application used to post status.
pub application: Option<Application>,
+ /// The detected language for the status, if detected.
+ pub language: Option<String>,
+ /// Whether this is the pinned status for the account that posted it.
+ pub pinned: Option<bool>,
}
/// A mention of another user.
@@ -66,6 +72,17 @@ pub struct Mention {
pub id: String,
}
+/// Struct representing an emoji within text.
+#[derive(Clone, Debug, Deserialize)]
+pub struct Emoji {
+ /// The shortcode of the emoji
+ pub shortcode: String,
+ /// URL to the emoji static image
+ pub static_url: String,
+ /// URL to the emoji image
+ pub url: String,
+}
+
/// Hashtags in the status.
#[derive(Debug, Clone, Deserialize)]
pub struct Tag {