Module egg_mode::user[][src]

Expand description

Structs and methods for pulling user information from Twitter.

Everything in here acts on users in some way, whether looking up user information, finding the relations between two users, or actions like following or blocking a user.

Types

  • UserID: used as a generic input to many functions, this enum allows you to refer to a user by a numeric ID or by their screen name.
  • Relationship/RelationSource/RelationTarget: returned by relation, these types (Relationship contains the other two) show the ways two accounts relate to each other.
  • RelationLookup/Connection: returned as part of a collection by relation_lookup, these types (RelationLookup contains a Vec<Connection>) shows the ways the authenticated user relates to a specific account.
  • TwitterUser/UserEntities/UserEntityDetail: returned by many functions in this module, these types (TwitterUser contains the other two) describe the content of a user’s profile, and a handful of settings relating to how their profile is displayed.
  • UserSearch: returned by search, this is a stream of search results.

Functions

User actions

These functions perform actions to the user’s account. Their use requires that your application request write access to authenticated accounts.

  • block/report_spam/unblock
  • follow/unfollow/update_follow
  • mute/unmute

Direct lookup

These functions return single users, or groups of users without having to iterate over the results.

  • show
  • lookup/lookup_ids/lookup_names
  • friends_no_retweets
  • relation/relation_lookup

Cursored lookup

These functions imply that they can return more entries than Twitter is willing to return at once, so they’re delivered in pages. This library takes those paginated results and wraps a stream around them that loads the pages as-needed.

  • search
  • friends_of/friends_ids
  • followers_of/followers_ids
  • blocks/blocks_ids
  • mutes/mutes_ids
  • incoming_requests/outgoing_requests

Structs

Represents the relation the authenticated user has to a given account.

Represents relationship settings between two Twitter accounts, from the perspective of the source user.

Represents relationship settings between two Twitter accounts, from the perspective of the target user.

Represents relationship settings between two Twitter accounts.

Represents a Twitter user.

Container for URL entity information that may be paired with a user’s profile.

Represents a collection of URL entity information paired with a specific user profile field.

Represents an active user search.

Enums

Represents the ways a target account can be connected to another account.

Convenience enum to generalize between referring to an account by numeric ID or by screen name.

Functions

Block the given account with the authenticated user.

Lookup the users that have been blocked by the authenticated user.

Lookup the users that have been blocked by the authenticated user, but only return their user IDs.

Follow the given account with the authenticated user, and set whether device notifications should be enabled.

Lookup the users that follow a given account, but only return their user IDs.

Lookup the users that follow a given account.

Lookup the users a given account follows, also called their “friends” within the API, but only return their user IDs.

Lookup the user IDs that the authenticating user has disabled retweets from.

Lookup the users a given account follows, also called their “friends” within the API.

Lookup the user IDs who have pending requests to follow the authenticated protected user.

Look up profile information for several Twitter users.

Mute the given user with the authenticated user.

Lookup the users that have been muted by the authenticated user.

Lookup the users that have been muted by the authenticated user, but only return their user IDs.

Lookup the user IDs with which the authenticating user has a pending follow request.

Lookup relationship settings between two arbitrary users.

Lookup the relations between the authenticated user and the given accounts.

Block the given account and report it for spam, with the authenticated user.

Lookup users based on the given search term.

Lookup user information for a single user.

Unblock the given user with the authenticated user.

Unfollow the given account with the authenticated user.

Unmute the given user with the authenticated user.

Update notification settings and reweet visibility for the given user.