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 byrelation, these types (Relationshipcontains the other two) show the ways two accounts relate to each other.RelationLookup/Connection: returned as part of a collection byrelation_lookup, these types (RelationLookupcontains aVec<Connection>) shows the ways the authenticated user relates to a specific account.TwitterUser/UserEntities/UserEntityDetail: returned by many functions in this module, these types (TwitterUsercontains 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 bysearch, 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/unblockfollow/unfollow/update_followmute/unmute
§Direct lookup
These functions return single users, or groups of users without having to iterate over the results.
showlookup/lookup_ids/lookup_namesfriends_no_retweetsrelation/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.
searchfriends_of/friends_idsfollowers_of/followers_idsblocks/blocks_idsmutes/mutes_idsincoming_requests/outgoing_requests
Structs§
- Relation
Lookup - Represents the relation the authenticated user has to a given account.
- Relation
Source - Represents relationship settings between two Twitter accounts, from the perspective of the source user.
- Relation
Target - Represents relationship settings between two Twitter accounts, from the perspective of the target user.
- Relationship
- Represents relationship settings between two Twitter accounts.
- Twitter
User - Represents a Twitter user.
- User
Entities - Container for URL entity information that may be paired with a user’s profile.
- User
Entity Detail - Represents a collection of URL entity information paired with a specific user profile field.
- User
Search - Represents an active user search.
Enums§
- Connection
- Represents the ways a target account can be connected to another account.
- UserID
- Convenience enum to generalize between referring to an account by numeric ID or by screen name.
Functions§
- block
- Block the given account with the authenticated user.
- blocks
- Lookup the users that have been blocked by the authenticated user.
- blocks_
ids - Lookup the users that have been blocked by the authenticated user, but only return their user IDs.
- follow
- Follow the given account with the authenticated user, and set whether device notifications should be enabled.
- followers_
ids - Lookup the users that follow a given account, but only return their user IDs.
- followers_
of - Lookup the users that follow a given account.
- friends_
ids - Lookup the users a given account follows, also called their “friends” within the API, but only return their user IDs.
- friends_
no_ retweets - Lookup the user IDs that the authenticating user has disabled retweets from.
- friends_
of - Lookup the users a given account follows, also called their “friends” within the API.
- incoming_
requests - Lookup the user IDs who have pending requests to follow the authenticated protected user.
- lookup
- Look up profile information for several Twitter users.
- mute
- Mute the given user with the authenticated user.
- mutes
- Lookup the users that have been muted by the authenticated user.
- mutes_
ids - Lookup the users that have been muted by the authenticated user, but only return their user IDs.
- outgoing_
requests - Lookup the user IDs with which the authenticating user has a pending follow request.
- relation
- Lookup relationship settings between two arbitrary users.
- relation_
lookup - Lookup the relations between the authenticated user and the given accounts.
- report_
spam - Block the given account and report it for spam, with the authenticated user.
- search
- Lookup users based on the given search term.
- show
- Lookup user information for a single user.
- unblock
- Unblock the given user with the authenticated user.
- unfollow
- Unfollow the given account with the authenticated user.
- unmute
- Unmute the given user with the authenticated user.
- update_
follow - Update notification settings and reweet visibility for the given user.