Struct egg_mode::direct::DMEntities [] [src]

pub struct DMEntities {
    pub hashtags: Vec<HashtagEntity>,
    pub symbols: Vec<HashtagEntity>,
    pub urls: Vec<UrlEntity>,
    pub user_mentions: Vec<MentionEntity>,
    pub media: Option<Vec<MediaEntity>>,
}

Container for URL, hashtag, mention, and media information associated with a direct message.

As far as entities are concerned, a DM can contain nearly everything a tweet can. The only thing that isn't present here is the "extended media" that would be on the tweet's extended_entities field. A user can attach a single picture to a DM via the Twitter website or official apps, so if that is present, it will be available in media. (Note that the functionality to send pictures through a DM is unavailable on the public API; only viewing them is possible.)

For all other fields, if the message contains no hashtags, financial symbols ("cashtags"), links, or mentions, those corresponding fields will still be present, just empty.

Fields

Collection of hashtags parsed from the DM.

Collection of financial symbols, or "cashtags", parsed from the DM.

Collection of URLs parsed from the DM.

Collection of user mentions parsed from the DM.

If the message contains any attached media, this contains a collection of media information from it.