UsersClient
Class Bases: object Client for users operationsConstructors
__init__
Parameters
block_dms
Block DMs
Blocks direct messages to or from a specific User by their ID for the authenticated user.
Parameters
The ID of the target User that the authenticated user requesting to block dms for.
Returns
BlockDmsResponse - Response data
create_bookmark
Create Bookmark
Adds a post to the authenticated user’s bookmarks.
Parameters
The ID of the authenticated source User for whom to add bookmarks.
Request body
delete_bookmark
Delete Bookmark
Removes a Post from the authenticated user’s Bookmarks by its ID.
Parameters
The ID of the authenticated source User whose bookmark is to be removed.
The ID of the Post that the source User is removing from bookmarks.
Returns
DeleteBookmarkResponse - Response data
follow_list
Follow List
Causes the authenticated user to follow a specific List by its ID.
Parameters
The ID of the authenticated source User that will follow the List.
Request body
follow_user
Follow User
Causes the authenticated user to follow a specific user by their ID.
Parameters
The ID of the authenticated source User that is requesting to follow the target User.
Request body
get_blocking
Get blocking
Retrieves a list of Users blocked by the specified User ID.
Parameters
The ID of the authenticated source User for whom to return results.
The maximum number of results.
This parameter is used to get a specified ‘page’ of results.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetBlockingResponse - Response data
get_bookmark_folders
Get Bookmark folders
Retrieves a list of Bookmark folders created by the authenticated user.
Parameters
The ID of the authenticated source User for whom to return results.
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
Returns
GetBookmarkFoldersResponse - Response data
get_bookmarks
Get Bookmarks
Retrieves a list of Posts bookmarked by the authenticated user.
Parameters
The ID of the authenticated source User for whom to return results.
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
A comma separated list of Tweet fields to display.
A comma separated list of fields to expand.
A comma separated list of Media fields to display.
A comma separated list of Poll fields to display.
A comma separated list of User fields to display.
A comma separated list of Place fields to display.
Returns
GetBookmarksResponse - Response data
get_bookmarks_by_folder_id
Get Bookmarks by folder ID
Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user.
Parameters
The ID of the authenticated source User for whom to return results.
The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for.
Returns
GetBookmarksByFolderIdResponse - Response data
get_by_id
Get User by ID
Retrieves details of a specific User by their ID.
Parameters
The ID of the User to lookup.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetByIdResponse - Response data
get_by_ids
Get Users by IDs
Retrieves details of multiple Users by their IDs.
Parameters
A list of User IDs, comma-separated. You can specify up to 100 IDs.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetByIdsResponse - Response data
get_by_username
Get User by username
Retrieves details of a specific User by their username.
Parameters
A username.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetByUsernameResponse - Response data
get_by_usernames
Get Users by usernames
Retrieves details of multiple Users by their usernames.
Parameters
A list of usernames, comma-separated.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetByUsernamesResponse - Response data
get_followed_lists
Get followed Lists
Retrieves a list of Lists followed by a specific User by their ID.
Parameters
The ID of the User to lookup.
The maximum number of results.
This parameter is used to get a specified ‘page’ of results.
A comma separated list of List fields to display.
A comma separated list of fields to expand.
A comma separated list of User fields to display.
Returns
GetFollowedListsResponse - Response data
get_followers
Get followers
Retrieves a list of Users who follow a specific User by their ID.
Parameters
The ID of the User to lookup.
The maximum number of results.
This parameter is used to get a specified ‘page’ of results.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetFollowersResponse - Response data
get_following
Get following
Retrieves a list of Users followed by a specific User by their ID.
Parameters
The ID of the User to lookup.
The maximum number of results.
This parameter is used to get a specified ‘page’ of results.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetFollowingResponse - Response data
get_liked_posts
Get liked Posts
Retrieves a list of Posts liked by a specific User by their ID.
Parameters
The ID of the User to lookup.
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
A comma separated list of Tweet fields to display.
A comma separated list of fields to expand.
A comma separated list of Media fields to display.
A comma separated list of Poll fields to display.
A comma separated list of User fields to display.
A comma separated list of Place fields to display.
Returns
GetLikedPostsResponse - Response data
get_list_memberships
Get List memberships
Retrieves a list of Lists that a specific User is a member of by their ID.
Parameters
The ID of the User to lookup.
The maximum number of results.
This parameter is used to get a specified ‘page’ of results.
A comma separated list of List fields to display.
A comma separated list of fields to expand.
A comma separated list of User fields to display.
Returns
GetListMembershipsResponse - Response data
get_me
Get my User
Retrieves details of the authenticated user.
Parameters
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetMeResponse - Response data
get_mentions
Get mentions
Retrieves a list of Posts that mention a specific User by their ID.
Parameters
The ID of the User to lookup.
The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.
The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified.
YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified.
A comma separated list of Tweet fields to display.
A comma separated list of fields to expand.
A comma separated list of Media fields to display.
A comma separated list of Poll fields to display.
A comma separated list of User fields to display.
A comma separated list of Place fields to display.
Returns
GetMentionsResponse - Response data
get_muting
Get muting
Retrieves a list of Users muted by the authenticated user.
Parameters
The ID of the authenticated source User for whom to return results.
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
GetMutingResponse - Response data
get_owned_lists
Get owned Lists
Retrieves a list of Lists owned by a specific User by their ID.
Parameters
The ID of the User to lookup.
The maximum number of results.
This parameter is used to get a specified ‘page’ of results.
A comma separated list of List fields to display.
A comma separated list of fields to expand.
A comma separated list of User fields to display.
Returns
GetOwnedListsResponse - Response data
get_pinned_lists
Get pinned Lists
Retrieves a list of Lists pinned by the authenticated user.
Parameters
The ID of the authenticated source User for whom to return results.
A comma separated list of List fields to display.
A comma separated list of fields to expand.
A comma separated list of User fields to display.
Returns
GetPinnedListsResponse - Response data
get_posts
Get Posts
Retrieves a list of posts authored by a specific User by their ID.
Parameters
The ID of the User to lookup.
The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.
The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
The set of entities to exclude (e.g. ‘replies’ or ‘retweets’).
YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified.
YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified.
A comma separated list of Tweet fields to display.
A comma separated list of fields to expand.
A comma separated list of Media fields to display.
A comma separated list of Poll fields to display.
A comma separated list of User fields to display.
A comma separated list of Place fields to display.
Returns
GetPostsResponse - Response data
get_reposts_of_me
Get Reposts of me
Retrieves a list of Posts that repost content from the authenticated user.
Parameters
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
A comma separated list of Tweet fields to display.
A comma separated list of fields to expand.
A comma separated list of Media fields to display.
A comma separated list of Poll fields to display.
A comma separated list of User fields to display.
A comma separated list of Place fields to display.
Returns
GetRepostsOfMeResponse - Response data
get_timeline
Get Timeline
Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline.
Parameters
The ID of the authenticated source User to list Reverse Chronological Timeline Posts of.
The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.
The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.
The maximum number of results.
This parameter is used to get the next ‘page’ of results.
The set of entities to exclude (e.g. ‘replies’ or ‘retweets’).
YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified.
YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified.
A comma separated list of Tweet fields to display.
A comma separated list of fields to expand.
A comma separated list of Media fields to display.
A comma separated list of Poll fields to display.
A comma separated list of User fields to display.
A comma separated list of Place fields to display.
Returns
GetTimelineResponse - Response data
like_post
Like Post
Causes the authenticated user to Like a specific Post by its ID.
Parameters
The ID of the authenticated source User that is requesting to like the Post.
Request body
mute_user
Mute User
Causes the authenticated user to mute a specific User by their ID.
Parameters
The ID of the authenticated source User that is requesting to mute the target User.
Request body
pin_list
Pin List
Causes the authenticated user to pin a specific List by its ID.
Parameters
The ID of the authenticated source User that will pin the List.
Request body
repost_post
Repost Post
Causes the authenticated user to repost a specific Post by its ID.
Parameters
The ID of the authenticated source User that is requesting to repost the Post.
Request body
search
Search Users
Retrieves a list of Users matching a search query.
Parameters
TThe the query string by which to query for users.
The maximum number of results.
This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Returns
SearchResponse - Response data
unblock_dms
Unblock DMs
Unblocks direct messages to or from a specific User by their ID for the authenticated user.
Parameters
The ID of the target User that the authenticated user requesting to unblock dms for.
Returns
UnblockDmsResponse - Response data
unfollow_list
Unfollow List
Causes the authenticated user to unfollow a specific List by its ID.
Parameters
The ID of the authenticated source User that will unfollow the List.
The ID of the List to unfollow.
Returns
UnfollowListResponse - Response data
unfollow_user
Unfollow User
Causes the authenticated user to unfollow a specific user by their ID.
Parameters
The ID of the authenticated source User that is requesting to unfollow the target User.
The ID of the User that the source User is requesting to unfollow.
Returns
UnfollowUserResponse - Response data
unlike_post
Unlike Post
Causes the authenticated user to Unlike a specific Post by its ID.
Parameters
The ID of the authenticated source User that is requesting to unlike the Post.
The ID of the Post that the User is requesting to unlike.
Returns
UnlikePostResponse - Response data
unmute_user
Unmute User
Causes the authenticated user to unmute a specific user by their ID.
Parameters
The ID of the authenticated source User that is requesting to unmute the target User.
The ID of the User that the source User is requesting to unmute.
Returns
UnmuteUserResponse - Response data
unpin_list
Unpin List
Causes the authenticated user to unpin a specific List by its ID.
Parameters
The ID of the authenticated source User for whom to return results.
The ID of the List to unpin.
Returns
UnpinListResponse - Response data
unrepost_post
Unrepost Post
Causes the authenticated user to unrepost a specific Post by its ID.
Parameters
The ID of the authenticated source User that is requesting to repost the Post.
The ID of the Post that the User is requesting to unretweet.
Returns
UnrepostPostResponse - Response data