Struct egg_mode::direct::DirectMessage [−][src]
pub struct DirectMessage { pub id: u64, pub created_at: DateTime<Utc>, pub text: String, pub entities: DMEntities, pub attachment: Option<MediaEntity>, pub ctas: Option<Vec<Cta>>, pub quick_replies: Option<Vec<QuickReply>>, pub quick_reply_response: Option<String>, pub sender_id: u64, pub source_app: Option<TweetSource>, pub recipient_id: u64, }
Expand description
Represents a single direct message.
Fields
id: u64
Numeric ID for this DM.
created_at: DateTime<Utc>
UTC timestamp from when this DM was created.
text: String
The text of the DM.
entities: DMEntities
Link, hashtag, and user mention information parsed out of the DM.
attachment: Option<MediaEntity>
An image, gif, or video attachment, if present.
ctas: Option<Vec<Cta>>
A list of “call to action” buttons attached to the DM, if present.
quick_replies: Option<Vec<QuickReply>>
A list of “Quick Replies” sent with this message to request structured input from the recipient.
Note that there is no way to select a Quick Reply as a response in the public API; a
quick_reply_response
can only be populated if the Quick Reply was selected in the Twitter
Web Client, or Twitter for iOS/Android.
quick_reply_response: Option<String>
The metadata
accompanying a Quick Reply, if the sender selected a Quick Reply for their
response.
sender_id: u64
The ID of the user who sent the DM.
To load full user information for the sender or recipient, use user::show
. Note that
Twitter may show a message with a user that doesn’t exist if that user has been suspended
or has deleted their account.
source_app: Option<TweetSource>
The app that sent this direct message.
Source app information is only available for messages sent by the authorized user. For
received messages written by other users, this field will be None
.
recipient_id: u64
The ID of the user who received the DM.
To load full user information for the sender or recipient, use user::show
. Note that
Twitter may show a message with a user that doesn’t exist if that user has been suspended
or has deleted their account.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for DirectMessage
impl Send for DirectMessage
impl Sync for DirectMessage
impl Unpin for DirectMessage
impl UnwindSafe for DirectMessage