[−][src]Module egg_mode::direct
the direct message endpoints used in this module are no longer in service, and this module has not been migrated over to the DM Events API
Structs and methods for working with direct messages.
Note that direct message access requires a special permissions level above regular read/write access. Your app must be configured to have "read, write, and direct message" access to use any function in this module, even the read-only ones.
Although the Twitter website and official apps display DMs as threads between the authenticated
user and specific other users, the API does not expose them like this. Separate calls to
received and sent are necessary to fully reconstruct a DM thread. You can partition on
sender_id/receiver_id and sort by their created_at to weave the streams together.
Types
DirectMessage/DMEntities: A single DM and its associated entities. TheDMEntitiesstruct contains information about URLs, user mentions, and hashtags in the DM.Timeline: Effectively the same astweet::Timeline, but gives outDirectMessages instead. Returned by functions that traverse collections of DMs.ConversationTimeline/DMConversations: This struct and alias are part of the "conversations" wrapper for loading direct messages into per-recipient threads.
Functions
Lookup
These functions pull a user's DMs for viewing. sent and received can be cursored with
sub-views like with tweets, so they return a Timeline instance that can be navigated at will.
sentreceivedshowconversations
Actions
These functions are your basic write access to DMs. As a DM does not carry as much metadata as
a tweet, the send action does not go through a builder struct like with DraftTweet.
senddelete
Structs
| ConversationTimeline | Deprecated Helper struct to load both sent and received direct messages, pre-sorting them into conversations by their recipient. |
| DMEntities | Deprecated Container for URL, hashtag, mention, and media information associated with a direct message. |
| DirectMessage | Deprecated Represents a single direct message. |
| Timeline | Deprecated Helper struct to navigate collections of direct messages by requesting DMs older or newer than certain IDs. |
Functions
| conversations | Deprecated Create a |
| delete | Deprecated Delete the direct message with the given ID. |
| received | Deprecated Create a |
| send | Deprecated Send a new direct message to the given user. |
| sent | Deprecated Create a |
| show | Deprecated Lookup a single DM by its numeric ID. |
Type Definitions
| DMConversations | Deprecated Wrapper around a collection of direct messages, sorted by their recipient. |