Skip to main content

하위 모듈

모듈 내용

이 모듈은 X API의 users 엔드포인트에 대한 액세스를 제공합니다. 모든 users-related 기능의 주요 진입점 역할을 합니다.

class xdk.users.UsersClient

사용자 작업을 위한 클라이언트

매개변수

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 - 응답 데이터

create_bookmark

Bookmark 생성 Adds a post to the authenticated user’s bookmarks.

매개변수

Any
The ID of the authenticated source User for whom to add bookmarks.
CreateBookmarkRequest
요청 본문

delete_bookmark

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 - 응답 데이터

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
요청 본문

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
요청 본문

get_blocking

차단 목록 조회 Retrieves a list of 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"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetBlockingResponse

get_bookmark_folders

Bookmark 폴더 조회 Retrieves a list of 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"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.

반환값

IteratorGetBookmarkFoldersResponse

get_bookmarks

Bookmark 목록 조회 Retrieves a list of Posts bookmarked by the authenticated user.

매개변수

Any
The ID of the authenticated source User for whom to return results.
int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Media 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Poll 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Place 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetBookmarksResponse

get_bookmarks_by_folder_id

폴더 ID로 Bookmark 조회 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 - 응답 데이터

get_by_id

ID로 User 조회 Retrieves details of a specific User by their ID.

매개변수

Any
The ID of the User to lookup.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

GetByIdResponse - 응답 데이터

get_by_ids

ID로 User 목록 조회 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"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

GetByIdsResponse - 응답 데이터

get_by_username

username으로 User 조회 Retrieves details of a specific User by their username.

매개변수

str
A username.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

GetByUsernameResponse - 응답 데이터

get_by_usernames

username으로 User 목록 조회 Retrieves details of multiple Users by their usernames.

매개변수

List
A list of usernames, comma-separated.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

GetByUsernamesResponse - 응답 데이터

get_followed_lists

팔로우한 List 조회 Retrieves a list of Lists followed by a specific User by their ID.

매개변수

Any
The ID of the User to lookup.
int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
표시할 List 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetFollowedListsResponse

get_followers

팔로워 조회 Retrieves a list of Users who follow a specific User by their ID.

매개변수

Any
The ID of the User to lookup.
int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetFollowersResponse

get_following

팔로잉 조회 Retrieves a list of Users followed by a specific User by their ID.

매개변수

Any
The ID of the User to lookup.
int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetFollowingResponse

get_liked_posts

Get liked Posts Retrieves a list of Posts liked by a specific User by their ID.

매개변수

Any
The ID of the User to lookup.
int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Media 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Poll 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Place 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetLikedPostsResponse

get_list_memberships

List 멤버십 조회 Retrieves a list of 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"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
표시할 List 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetListMembershipsResponse

get_me

Get my User Retrieves details of the authenticated user.

매개변수

List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

GetMeResponse - 응답 데이터

get_mentions

Get mentions Retrieves a list of 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"
결과의 최대 개수입니다.
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"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Media 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Poll 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Place 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetMentionsResponse

get_muting

뮤트 목록 조회 Retrieves a list of Users muted by the authenticated user.

매개변수

Any
The ID of the authenticated source User for whom to return results.
int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetMutingResponse

get_owned_lists

Get owned Lists Retrieves a list of Lists owned by a specific User by their ID.

매개변수

Any
The ID of the User to lookup.
int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get a specified ‘page’ of results.
List or None
default:"None"
표시할 List 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetOwnedListsResponse

get_pinned_lists

Get pinned Lists Retrieves a list of Lists pinned by the authenticated user.

매개변수

Any
The ID of the authenticated source User for whom to return results.
List or None
default:"None"
표시할 List 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.

반환값

GetPinnedListsResponse - 응답 데이터

get_posts

Post 목록 조회 Retrieves a list of 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"
결과의 최대 개수입니다.
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"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Media 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Poll 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Place 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetPostsResponse

get_reposts_of_me

나의 리포스트 조회 Retrieves a list of Posts that repost content from the authenticated user.

매개변수

int or None
default:"None"
결과의 최대 개수입니다.
Any or None
default:"None"
This parameter is used to get the next ‘page’ of results.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Media 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Poll 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Place 필드의 쉼표로 구분된 목록입니다.

반환값

IteratorGetRepostsOfMeResponse

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"
결과의 최대 개수입니다.
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"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Media 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Poll 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Place 필드의 쉼표로 구분된 목록입니다.

반환값

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
요청 본문

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
요청 본문

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
요청 본문

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
요청 본문
Search Users Retrieves a list of Users matching a search query.

매개변수

Any
TThe the query string by which to query for users.
int or None
default:"None"
결과의 최대 개수입니다.
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"
표시할 User 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
확장할 필드의 쉼표로 구분된 목록입니다.
List or None
default:"None"
표시할 Tweet 필드의 쉼표로 구분된 목록입니다.

반환값

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 - 응답 데이터

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 - 응답 데이터

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 - 응답 데이터

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 - 응답 데이터

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 - 응답 데이터

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 - 응답 데이터

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 - 응답 데이터