サブモジュール
- xdk.users.client module
UsersClientUsersClient.__init__()UsersClient.block_dms()UsersClient.create_bookmark()UsersClient.delete_bookmark()UsersClient.follow_list()UsersClient.follow_user()UsersClient.get_blocking()UsersClient.get_bookmark_folders()UsersClient.get_bookmarks()UsersClient.get_bookmarks_by_folder_id()UsersClient.get_by_id()UsersClient.get_by_ids()UsersClient.get_by_username()UsersClient.get_by_usernames()UsersClient.get_followed_lists()UsersClient.get_followers()UsersClient.get_following()UsersClient.get_liked_posts()UsersClient.get_list_memberships()UsersClient.get_me()UsersClient.get_mentions()UsersClient.get_muting()UsersClient.get_owned_lists()UsersClient.get_pinned_lists()UsersClient.get_posts()UsersClient.get_reposts_of_me()UsersClient.get_timeline()UsersClient.like_post()UsersClient.mute_user()UsersClient.pin_list()UsersClient.repost_post()UsersClient.search()UsersClient.unblock_dms()UsersClient.unfollow_list()UsersClient.unfollow_user()UsersClient.unlike_post()UsersClient.unmute_user()UsersClient.unpin_list()UsersClient.unrepost_post()
- xdk.users.models module
BlockDmsResponseCreateBookmarkRequestCreateBookmarkResponseDeleteBookmarkResponseFollowListRequestFollowListResponseFollowUserRequestFollowUserResponseGetBlockingResponseGetBookmarkFoldersResponseGetBookmarksByFolderIdResponseGetBookmarksResponseGetByIdResponseGetByIdsResponseGetByUsernameResponseGetByUsernamesResponseGetFollowedListsResponseGetFollowersResponseGetFollowingResponseGetLikedPostsResponseGetListMembershipsResponseGetMeResponseGetMentionsResponseGetMutingResponseGetOwnedListsResponseGetPinnedListsResponseGetPostsResponseGetRepostsOfMeResponseGetTimelineResponseLikePostRequestLikePostResponseMuteUserRequestMuteUserResponsePinListRequestPinListResponseRepostPostRequestRepostPostResponseSearchResponseUnblockDmsResponseUnfollowListResponseUnfollowUserResponseUnlikePostResponseUnmuteUserResponseUnpinListResponseUnrepostPostResponse
モジュールの内容
このモジュールは、X API の users エンドポイントへのアクセスを提供します users-related のすべての機能の主要なエントリポイントとして機能します。class xdk.users.UsersClient
users 操作向けのクライアント
パラメーター
Client
__init__
パラメーター
Client
block_dms
Block DMs
Blocks direct messages to or from a specific User by their ID for the authenticated user.
パラメーター
Any
The ID of the target User that the authenticated user requesting to block dms for.
戻り値
BlockDmsResponse - Response data
create_bookmark
Create Bookmark
Adds a post to the authenticated user’s bookmarks.
パラメーター
Any
The ID of the authenticated source User for whom to add bookmarks.
CreateBookmarkRequest
Request body
delete_bookmark
Delete Bookmark
Removes a Post from the authenticated user’s Bookmarks by its ID.
パラメーター
Any
The ID of the authenticated source User whose bookmark is to be removed.
Any
The ID of the Post that the source User is removing from bookmarks.
戻り値
DeleteBookmarkResponse - Response data
follow_list
Follow List
Causes the authenticated user to follow a specific List by its ID.
パラメーター
Any
The ID of the authenticated source User that will follow the List.
FollowListRequest
Request body
follow_user
Follow User
Causes the authenticated user to follow a specific user by their ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to follow the target User.
FollowUserRequest
Request body
get_blocking
Get blocking
次の一覧を取得します: Users blocked by the specified User ID.
パラメーター
Any
The ID of the authenticated source User for whom to return results.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
IteratorGetBlockingResponse
get_bookmark_folders
Get Bookmark folders
次の一覧を取得します: Bookmark folders created by the authenticated user.
パラメーター
Any
The ID of the authenticated source User for whom to return results.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
戻り値
IteratorGetBookmarkFoldersResponse
get_bookmarks
Get Bookmarks
次の一覧を取得します: Posts bookmarked by the authenticated user.
パラメーター
Any
The ID of the authenticated source User for whom to return results.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
A comma separated list of Tweet fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Media fields to display.
List or None
default:"None"
A comma separated list of Poll fields to display.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of Place fields to display.
戻り値
IteratorGetBookmarksResponse
get_bookmarks_by_folder_id
Get Bookmarks by folder ID
Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user.
パラメーター
Any
The ID of the authenticated source User for whom to return results.
Any
The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for.
戻り値
GetBookmarksByFolderIdResponse - Response data
get_by_id
Get User by ID
Retrieves details of a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
GetByIdResponse - Response data
get_by_ids
Get Users by IDs
Retrieves details of multiple Users by their IDs.
パラメーター
List
A list of User IDs, comma-separated. You can specify up to 100 IDs.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
GetByIdsResponse - Response data
get_by_username
Get User by username
Retrieves details of a specific User by their username.
パラメーター
str
A username.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
GetByUsernameResponse - Response data
get_by_usernames
Get Users by usernames
Retrieves details of multiple Users by their usernames.
パラメーター
List
A list of usernames, comma-separated.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
GetByUsernamesResponse - Response data
get_followed_lists
Get followed Lists
次の一覧を取得します: Lists followed by a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
A comma separated list of List fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of User fields to display.
戻り値
IteratorGetFollowedListsResponse
get_followers
Get followers
次の一覧を取得します: Users who follow a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
IteratorGetFollowersResponse
get_following
Get following
次の一覧を取得します: Users followed by a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
IteratorGetFollowingResponse
get_liked_posts
Get liked Posts
次の一覧を取得します: Posts liked by a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
A comma separated list of Tweet fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Media fields to display.
List or None
default:"None"
A comma separated list of Poll fields to display.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of Place fields to display.
戻り値
IteratorGetLikedPostsResponse
get_list_memberships
Get List memberships
次の一覧を取得します: Lists that a specific User is a member of by their ID.
パラメーター
Any
The ID of the User to lookup.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
A comma separated list of List fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of User fields to display.
戻り値
IteratorGetListMembershipsResponse
get_me
Get my User
Retrieves details of the authenticated user.
パラメーター
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
GetMeResponse - Response data
get_mentions
Get mentions
次の一覧を取得します: Posts that mention a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
Any or None
default:"None"
The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.
Any or None
default:"None"
The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
str or None
default:"None"
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.
str or None
default:"None"
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.
List or None
default:"None"
A comma separated list of Tweet fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Media fields to display.
List or None
default:"None"
A comma separated list of Poll fields to display.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of Place fields to display.
戻り値
IteratorGetMentionsResponse
get_muting
Get muting
次の一覧を取得します: Users muted by the authenticated user.
パラメーター
Any
The ID of the authenticated source User for whom to return results.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
IteratorGetMutingResponse
get_owned_lists
Get owned Lists
次の一覧を取得します: Lists owned by a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
A comma separated list of List fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of User fields to display.
戻り値
IteratorGetOwnedListsResponse
get_pinned_lists
Get pinned Lists
次の一覧を取得します: Lists pinned by the authenticated user.
パラメーター
Any
The ID of the authenticated source User for whom to return results.
List or None
default:"None"
A comma separated list of List fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of User fields to display.
戻り値
GetPinnedListsResponse - Response data
get_posts
Get Posts
次の一覧を取得します: posts authored by a specific User by their ID.
パラメーター
Any
The ID of the User to lookup.
Any or None
default:"None"
The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.
Any or None
default:"None"
The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
The set of entities to exclude (e.g. ‘replies’ or ‘retweets’).
str or None
default:"None"
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.
str or None
default:"None"
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.
List or None
default:"None"
A comma separated list of Tweet fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Media fields to display.
List or None
default:"None"
A comma separated list of Poll fields to display.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of Place fields to display.
戻り値
IteratorGetPostsResponse
get_reposts_of_me
Get Reposts of me
次の一覧を取得します: Posts that repost content from the authenticated user.
パラメーター
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
A comma separated list of Tweet fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Media fields to display.
List or None
default:"None"
A comma separated list of Poll fields to display.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of Place fields to display.
戻り値
IteratorGetRepostsOfMeResponse
get_timeline
Get Timeline
Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline.
パラメーター
Any
The ID of the authenticated source User to list Reverse Chronological Timeline Posts of.
Any or None
default:"None"
The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified.
Any or None
default:"None"
The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
The set of entities to exclude (e.g. ‘replies’ or ‘retweets’).
str or None
default:"None"
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.
str or None
default:"None"
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.
List or None
default:"None"
A comma separated list of Tweet fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Media fields to display.
List or None
default:"None"
A comma separated list of Poll fields to display.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of Place fields to display.
戻り値
IteratorGetTimelineResponse
like_post
Like Post
Causes the authenticated user to Like a specific Post by its ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to like the Post.
LikePostRequest
Request body
mute_user
Mute User
Causes the authenticated user to mute a specific User by their ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to mute the target User.
MuteUserRequest
Request body
pin_list
Pin List
Causes the authenticated user to pin a specific List by its ID.
パラメーター
Any
The ID of the authenticated source User that will pin the List.
PinListRequest
Request body
repost_post
Repost Post
Causes the authenticated user to repost a specific Post by its ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to repost the Post.
RepostPostRequest
Request body
search
Search Users
次の一覧を取得します: Users matching a search query.
パラメーター
Any
TThe the query string by which to query for users.
int or None
default:"None"
The maximum number of results.
Any or None
default:"None"
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.
List or None
default:"None"
A comma separated list of User fields to display.
List or None
default:"None"
A comma separated list of fields to expand.
List or None
default:"None"
A comma separated list of Tweet fields to display.
戻り値
IteratorSearchResponse
unblock_dms
Unblock DMs
Unblocks direct messages to or from a specific User by their ID for the authenticated user.
パラメーター
Any
The ID of the target User that the authenticated user requesting to unblock dms for.
戻り値
UnblockDmsResponse - Response data
unfollow_list
Unfollow List
Causes the authenticated user to unfollow a specific List by its ID.
パラメーター
Any
The ID of the authenticated source User that will unfollow the List.
Any
The ID of the List to unfollow.
戻り値
UnfollowListResponse - Response data
unfollow_user
Unfollow User
Causes the authenticated user to unfollow a specific user by their ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to unfollow the target User.
Any
The ID of the User that the source User is requesting to unfollow.
戻り値
UnfollowUserResponse - Response data
unlike_post
Unlike Post
Causes the authenticated user to Unlike a specific Post by its ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to unlike the Post.
Any
The ID of the Post that the User is requesting to unlike.
戻り値
UnlikePostResponse - Response data
unmute_user
Unmute User
Causes the authenticated user to unmute a specific user by their ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to unmute the target User.
Any
The ID of the User that the source User is requesting to unmute.
戻り値
UnmuteUserResponse - Response data
unpin_list
Unpin List
Causes the authenticated user to unpin a specific List by its ID.
パラメーター
Any
The ID of the authenticated source User for whom to return results.
Any
The ID of the List to unpin.
戻り値
UnpinListResponse - Response data
unrepost_post
Unrepost Post
Causes the authenticated user to unrepost a specific Post by its ID.
パラメーター
Any
The ID of the authenticated source User that is requesting to repost the Post.
Any
The ID of the Post that the User is requesting to unretweet.
戻り値
UnrepostPostResponse - Response data