[][src]Struct egg_mode::tweet::Tweet

pub struct Tweet {
    pub created_at: String,
    pub current_user_retweet: Option<i64>,
    pub entities: TweetEntities,
    pub extended_entities: Option<ExtendedTweetEntities>,
    pub favorite_count: i32,
    pub favorited: Option<bool>,
    pub id: i64,
    pub in_reply_to_user_id: Option<i64>,
    pub in_reply_to_screen_name: Option<String>,
    pub in_reply_to_status_id: Option<i64>,
    pub lang: String,
    pub possibly_sensitive: Option<bool>,
    pub quoted_status_id: Option<i64>,
    pub quoted_status: Option<Box<Tweet>>,
    pub retweet_count: i32,
    pub retweeted: Option<bool>,
    pub retweeted_status: Option<Box<Tweet>>,
    pub source: String,
    pub text: String,
    pub user: Box<TwitterUser>,
    pub withheld_copyright: bool,
    pub withheld_in_countries: Option<Vec<String>>,
    pub withheld_scope: Option<String>,
}

Represents a single status update.

The fields present in this struct can be mainly split up based on the context they're present for.

Base Tweet Info

This information is the basic information inherent to all tweets, regardless of context.

Perspective-based data

This information depends on the authenticated user who called the data. These are left as Options because certain contexts where the information is pulled either don't have an authenticated user to compare with, or don't have to opportunity to poll the user's interactions with the tweet.

Replies

This information is only present when the tweet in question is marked as being a reply to another tweet, or when it's threaded into a chain from the same user.

Retweets and Quote Tweets

This information is only present when the tweet in question is a native retweet or is a "quote tweet" that references another tweet by linking to it. These fields allow you to reference the parent tweet without having to make another call to show.

Media

As a tweet can attach an image, GIF, or video, these fields allow you to access information about the attached media. Note that polls are not surfaced to the Public API at the time of this writing (2016-09-01). For more information about how to use attached media, see the documentation for MediaEntity.

Fields

UTC timestamp showing when the tweet was posted, formatted like "Wed Aug 27 13:08:45 +0000 2008".

If the authenticated user has retweeted this tweet, contains the ID of the retweet.

Link, hashtag, and user mention information extracted from the tweet text.

Extended media information attached to the tweet, if media is available.

If a tweet has a photo, set of photos, gif, or video attached to it, this field will be present and contain the real media information. The information available in the media field of entities will only contain the first photo of a set, or a thumbnail of a gif or video.

"Approximately" how many times this tweet has been liked by users.

Indicates whether the authenticated user has liked this tweet.

Numeric ID for this tweet.

If the tweet is a reply, contains the ID of the user that was replied to.

If the tweet is a reply, contains the screen name of the user that was replied to.

If the tweet is a reply, contains the ID of the tweet that was replied to.

Can contain a language ID indicating the machine-detected language of the text, or "und" if no language could be detected.

If the tweet has a link, indicates whether the link may contain content that could be identified as sensitive.

If this tweet is quoting another by link, contains the ID of the quoted tweet.

If this tweet is quoting another by link, contains the quoted tweet.

The number of times this tweet has been retweeted (with native retweets).

Indicates whether the authenticated user has retweeted this tweet.

If this tweet is a retweet, then this field contains the original status information.

The separation between retweet and original is so that retweets can be recalled by deleting the retweet, and so that liking a retweet results in an additional notification to the user who retweeted the status, as well as the original poster.

The application used to post the tweet, as an HTML anchor tag containing the app's URL and name.

The text of the tweet.

The user who posted this tweet.

If present and true, indicates that this tweet has been withheld due to a DMCA complaint.

If present, contains two-letter country codes indicating where this tweet is being withheld.

The following special codes exist:

If present, indicates whether the content being withheld is the status or the user.

Trait Implementations

impl Debug for Tweet
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Tweet

impl Sync for Tweet

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Typeable for T where
    T: Any
[src]

Get the TypeId of this object.