Module egg_mode::tweet[][src]

Expand description

Structs and functions for working with statuses and timelines.

In this module, you can find various structs and methods to load and interact with tweets and their metadata. This also includes loading a user’s timeline, posting a new tweet, or liking or retweeting another tweet. However, this does not include searching for tweets; that functionality is in the search module.

Types

  • Tweet/TweetEntities/ExtendedTweetEntities: At the bottom of it all, this is the struct that represents a single tweet. The *Entities structs contain information about media, links, and hashtags within their parent tweet.
  • DraftTweet: This is what you use to post a new tweet. At present, not all available options are supported, but basics like marking the tweet as a reply and attaching a location coordinate are available.
  • Timeline: Returned by several functions in this module, this is how you cursor through a collection of tweets. See the struct-level documentation for details.

Functions

User actions

These functions perform actions on their given tweets. They require write access to the authenticated user’s account.

  • delete (for creating a tweet, see DraftTweet)
  • like/unlike
  • retweet/unretweet

Metadata lookup

These functions either perform some direct lookup of specific tweets, or provide some metadata about the given tweet in a direct (non-Timeline) fashion.

  • show
  • lookup/lookup_map (for the differences between these functions, see their respective documentations.)
  • retweeters_of
  • retweets_of

Timeline cursors

These functions return Timelines and can be cursored around in the same way. See the documentation for Timeline to learn how to navigate these return values. This correspond to a user’s own view of Twitter, or with feeds you might see attached to a user’s profile page.

  • home_timeline/mentions_timeline/retweets_of_me
  • user_timeline/liked_by

Structs

Represents an in-progress tweet before it is sent.

Container for extended media information for a tweet.

Helper struct to navigate collections of tweets by requesting tweets older or newer than certain IDs.

Future which represents loading from a Timeline.

Represents a single status update.

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

Represents the app from which a specific tweet was posted.

Functions

Delete the given tweet. The authenticated user must be the user who posted the given tweet.

Make a Timeline struct for navigating the collection of tweets posted by the authenticated user and the users they follow.

Like the given status as the authenticated user.

Make a Timeline struct for navigating the collection of tweets liked by the given user.

Lookup tweet information for the given list of tweet IDs.

Lookup tweet information for the given list of tweet IDs, and return a map indicating which IDs couldn’t be found.

Make a Timeline struct for navigating the collection of tweets that mention the authenticated user’s screen name.

Retweet the given status as the authenticated user.

Lookup the user IDs that have retweeted the given tweet.

Lookup the most recent 100 (or fewer) retweets of the given tweet.

Make a Timeline struct for navigating the collection of tweets posted by the authenticated user that have been retweeted by others.

Lookup a single tweet by numeric ID.

Clears a like of the given status as the authenticated user.

Unretweet the given status as the authenticated user.

Make a Timeline struct for navigating the collection of tweets posted by the given user, optionally including or excluding replies or retweets.