[−][src]Struct egg_mode::tweet::Tweet
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.
text
id
created_at
user
source
favorite_count
/retweet_count
lang
, though third-party clients usually don't surface this at a user-interface level. Twitter Web uses this to create machine-translations of the tweet.
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.
favorited
retweeted
current_user_retweet
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.
in_reply_to_user_id
/in_reply_to_screen_name
in_reply_to_status_id
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
.
retweeted_status
quoted_status
/quoted_status_id
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
.
entities
(note that this also contains information about hyperlinks, user mentions, and hashtags in addition to a picture/thumbnail)extended_entities
: This field is only present for tweets with attached media, and houses more complete media information, in the case of a photo set, video, or GIF. For videos and GIFs, note thatentities
will only contain a thumbnail, and the actual video links will be in this field. For tweets with more than one photo attached,entities
will only contain the first photo, and this field will contain all of them.possibly_sensitive
withheld_copyright
withheld_in_countries
withheld_scope
Fields
created_at: String
UTC timestamp showing when the tweet was posted, formatted like "Wed Aug 27 13:08:45 +0000 2008".
current_user_retweet: Option<i64>
If the authenticated user has retweeted this tweet, contains the ID of the retweet.
entities: TweetEntities
Link, hashtag, and user mention information extracted from the tweet text.
extended_entities: Option<ExtendedTweetEntities>
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.
favorite_count: i32
"Approximately" how many times this tweet has been liked by users.
favorited: Option<bool>
Indicates whether the authenticated user has liked this tweet.
id: i64
Numeric ID for this tweet.
in_reply_to_user_id: Option<i64>
If the tweet is a reply, contains the ID of the user that was replied to.
in_reply_to_screen_name: Option<String>
If the tweet is a reply, contains the screen name of the user that was replied to.
in_reply_to_status_id: Option<i64>
If the tweet is a reply, contains the ID of the tweet that was replied to.
lang: String
Can contain a language ID indicating the machine-detected language of the text, or "und" if no language could be detected.
possibly_sensitive: Option<bool>
If the tweet has a link, indicates whether the link may contain content that could be identified as sensitive.
quoted_status_id: Option<i64>
If this tweet is quoting another by link, contains the ID of the quoted tweet.
quoted_status: Option<Box<Tweet>>
If this tweet is quoting another by link, contains the quoted tweet.
retweet_count: i32
The number of times this tweet has been retweeted (with native retweets).
retweeted: Option<bool>
Indicates whether the authenticated user has retweeted this tweet.
retweeted_status: Option<Box<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.
source: String
The application used to post the tweet, as an HTML anchor tag containing the app's URL and name.
text: String
The text of the tweet.
user: Box<TwitterUser>
The user who posted this tweet.
withheld_copyright: bool
If present and true
, indicates that this tweet has been withheld due to a DMCA complaint.
withheld_in_countries: Option<Vec<String>>
If present, contains two-letter country codes indicating where this tweet is being withheld.
The following special codes exist:
XX
: Withheld in all countriesXY
: Withheld due to DMCA complaint.
withheld_scope: Option<String>
If present, indicates whether the content being withheld is the status
or the user
.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 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]
impl<T> Typeable for T where
T: Any,