> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-143107c1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# PostsClient

> X API SDK의 posts.client Python 모듈에 대한 참조입니다. X API v2의 posts 엔드포인트를 호출하기 위한 클라이언트 클래스와 메서드입니다.

## PostsClient

<Badge color="blue">Class</Badge>

<Badge color="gray">기반 클래스: object</Badge>

게시물 작업을 위한 클라이언트

## 생성자

### `__init__`

#### 매개변수

<ParamField path="path.client" type="Client" />

### `create`

Post 생성 또는 편집
인증된 사용자를 위해 새로운 Post를 생성하거나, edit\_options가 제공된 경우 기존 Post를 편집합니다.
body: 요청 본문
:returns: 응답 데이터
:rtype: CreateResponse

#### 매개변수

<ParamField path="body.body" type="CreateRequest" />

### `delete`

Post 삭제
인증된 사용자가 소유한 경우, 특정 Post를 해당 ID로 삭제합니다.

#### 매개변수

<ParamField path="path.id" type="Any">
  The ID of the Post to be deleted.
</ParamField>

#### 반환값

`DeleteResponse` - 응답 데이터

### `get_analytics`

Post 분석 조회
지정된 시간 범위 내에서 특정 Posts의 분석 데이터를 가져옵니다.

#### 매개변수

<ParamField path="path.ids" type="List">
  쉼표로 구분된 Post ID 목록입니다. 단일 요청에서 최대 100개까지 허용됩니다.
</ParamField>

<ParamField path="path.end_time" type="str">
  YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range.
</ParamField>

<ParamField path="path.start_time" type="str">
  YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range.
</ParamField>

<ParamField path="path.granularity" type="str">
  The granularity for the search counts results.
</ParamField>

<ParamField path="path.analytics_fields" type="List or None" default="None">
  표시할 Analytics 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`GetAnalyticsResponse` - 응답 데이터

### `get_by_id`

ID로 Post 조회
특정 Post의 세부 정보를 해당 ID로 가져옵니다.

#### 매개변수

<ParamField path="path.id" type="Any">
  단일 Post ID입니다.
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.media_fields" type="List or None" default="None">
  표시할 Media 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.poll_fields" type="List or None" default="None">
  표시할 Poll 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.place_fields" type="List or None" default="None">
  표시할 Place 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`GetByIdResponse` - 응답 데이터

### `get_by_ids`

ID로 Post 목록 조회
Retrieves details of multiple Posts by their IDs.

#### 매개변수

<ParamField path="path.ids" type="List">
  쉼표로 구분된 Post ID 목록입니다. 단일 요청에서 최대 100개까지 허용됩니다.
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.media_fields" type="List or None" default="None">
  표시할 Media 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.poll_fields" type="List or None" default="None">
  표시할 Poll 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.place_fields" type="List or None" default="None">
  표시할 Place 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`GetByIdsResponse` - 응답 데이터

### `get_counts_all`

모든 Post 수 조회
Retrieves the count of Posts matching a search query from the full archive.

#### 매개변수

<ParamField path="path.query" type="str">
  One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length.
</ParamField>

<ParamField path="path.start_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute).
</ParamField>

<ParamField path="path.end_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute).
</ParamField>

<ParamField path="path.since_id" type="Any or None" default="None">
  지정된 ID보다 크거나(즉, 더 최근인) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.until_id" type="Any or None" default="None">
  지정된 ID보다 작거나(즉, 더 오래된) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.next_token" type="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.
</ParamField>

<ParamField path="path.pagination_token" type="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.
</ParamField>

<ParamField path="path.granularity" type="str or None" default="None">
  The granularity for the search counts results.
</ParamField>

<ParamField path="path.search_count_fields" type="List or None" default="None">
  A comma separated list of SearchCount fields to display.
</ParamField>

#### 반환값

`IteratorGetCountsAllResponse`

### `get_counts_recent`

최근 Post 수 조회
Retrieves the count of Posts from the last 7 days matching a search query.

#### 매개변수

<ParamField path="path.query" type="str">
  One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length.
</ParamField>

<ParamField path="path.start_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute).
</ParamField>

<ParamField path="path.end_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute).
</ParamField>

<ParamField path="path.since_id" type="Any or None" default="None">
  지정된 ID보다 크거나(즉, 더 최근인) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.until_id" type="Any or None" default="None">
  지정된 ID보다 작거나(즉, 더 오래된) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.next_token" type="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.
</ParamField>

<ParamField path="path.pagination_token" type="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.
</ParamField>

<ParamField path="path.granularity" type="str or None" default="None">
  The granularity for the search counts results.
</ParamField>

<ParamField path="path.search_count_fields" type="List or None" default="None">
  A comma separated list of SearchCount fields to display.
</ParamField>

#### 반환값

`IteratorGetCountsRecentResponse`

### `get_insights28hr`

28시간 Post 인사이트 조회
Retrieves engagement metrics for specified Posts over the last 28 hours.

#### 매개변수

<ParamField path="path.tweet_ids" type="List">
  List of PostIds for 28hr metrics.
</ParamField>

<ParamField path="path.granularity" type="str">
  granularity of metrics response.
</ParamField>

<ParamField path="path.requested_metrics" type="List">
  request metrics for historical request.
</ParamField>

<ParamField path="path.engagement_fields" type="List or None" default="None">
  A comma separated list of Engagement fields to display.
</ParamField>

#### 반환값

`GetInsights28hrResponse` - 응답 데이터

### `get_insights_historical`

과거 Post 인사이트 조회
Retrieves historical engagement metrics for specified Posts within a defined time range.

#### 매개변수

<ParamField path="path.tweet_ids" type="List">
  List of PostIds for historical metrics.
</ParamField>

<ParamField path="path.end_time" type="str">
  YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range.
</ParamField>

<ParamField path="path.start_time" type="str">
  YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range.
</ParamField>

<ParamField path="path.granularity" type="str">
  granularity of metrics response.
</ParamField>

<ParamField path="path.requested_metrics" type="List">
  request metrics for historical request.
</ParamField>

<ParamField path="path.engagement_fields" type="List or None" default="None">
  A comma separated list of Engagement fields to display.
</ParamField>

#### 반환값

`GetInsightsHistoricalResponse` - 응답 데이터

### `get_liking_users`

좋아요를 누른 사용자 조회
Retrieves a list of Users who liked a specific Post by its ID.

#### 매개변수

<ParamField path="path.id" type="Any">
  단일 Post ID입니다.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  결과의 최대 개수입니다.
</ParamField>

<ParamField path="path.pagination_token" type="Any or None" default="None">
  This parameter is used to get the next ‘page’ of results.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`IteratorGetLikingUsersResponse`

### `get_quoted`

인용된 Post 조회
Retrieves a list of Posts that quote a specific Post by its ID.

#### 매개변수

<ParamField path="path.id" type="Any">
  단일 Post ID입니다.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  The maximum number of results to be returned.
</ParamField>

<ParamField path="path.pagination_token" type="Any or None" default="None">
  This parameter is used to get a specified ‘page’ of results.
</ParamField>

<ParamField path="path.exclude" type="List or None" default="None">
  The set of entities to exclude (e.g. ‘replies’ or ‘retweets’).
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.media_fields" type="List or None" default="None">
  표시할 Media 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.poll_fields" type="List or None" default="None">
  표시할 Poll 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.place_fields" type="List or None" default="None">
  표시할 Place 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`IteratorGetQuotedResponse`

### `get_reposted_by`

리포스트한 사용자 조회
Retrieves a list of Users who reposted a specific Post by its ID.

#### 매개변수

<ParamField path="path.id" type="Any">
  단일 Post ID입니다.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  결과의 최대 개수입니다.
</ParamField>

<ParamField path="path.pagination_token" type="Any or None" default="None">
  This parameter is used to get the next ‘page’ of results.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`IteratorGetRepostedByResponse`

### `get_reposts`

리포스트 조회
Retrieves a list of Posts that repost a specific Post by its ID.

#### 매개변수

<ParamField path="path.id" type="Any">
  단일 Post ID입니다.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  결과의 최대 개수입니다.
</ParamField>

<ParamField path="path.pagination_token" type="Any or None" default="None">
  This parameter is used to get the next ‘page’ of results.
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.media_fields" type="List or None" default="None">
  표시할 Media 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.poll_fields" type="List or None" default="None">
  표시할 Poll 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.place_fields" type="List or None" default="None">
  표시할 Place 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`IteratorGetRepostsResponse`

### `hide_reply`

Hide reply
Hides or unhides a reply to a conversation owned by the authenticated user.

#### 매개변수

<ParamField path="path.tweet_id" type="Any">
  The ID of the reply that you want to hide or unhide.
</ParamField>

<ParamField path="body.body" type="HideReplyRequest">
  요청 본문
</ParamField>

### `search_all`

Search all Posts
Retrieves Posts from the full archive matching a search query.

#### 매개변수

<ParamField path="path.query" type="str">
  One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length.
</ParamField>

<ParamField path="path.start_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute).
</ParamField>

<ParamField path="path.end_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute).
</ParamField>

<ParamField path="path.since_id" type="Any or None" default="None">
  지정된 ID보다 크거나(즉, 더 최근인) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.until_id" type="Any or None" default="None">
  지정된 ID보다 작거나(즉, 더 오래된) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  The maximum number of search results to be returned by a request.
</ParamField>

<ParamField path="path.next_token" type="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.
</ParamField>

<ParamField path="path.pagination_token" type="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.
</ParamField>

<ParamField path="path.sort_order" type="str or None" default="None">
  This order in which to return results.
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.media_fields" type="List or None" default="None">
  표시할 Media 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.poll_fields" type="List or None" default="None">
  표시할 Poll 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.place_fields" type="List or None" default="None">
  표시할 Place 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`IteratorSearchAllResponse`

### `search_recent`

Search recent Posts
Retrieves Posts from the last 7 days matching a search query.

#### 매개변수

<ParamField path="path.query" type="str">
  One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length.
</ParamField>

<ParamField path="path.start_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute).
</ParamField>

<ParamField path="path.end_time" type="str or None" default="None">
  YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute).
</ParamField>

<ParamField path="path.since_id" type="Any or None" default="None">
  지정된 ID보다 크거나(즉, 더 최근인) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.until_id" type="Any or None" default="None">
  지정된 ID보다 작거나(즉, 더 오래된) Post ID를 갖는 결과를 반환합니다.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  The maximum number of search results to be returned by a request.
</ParamField>

<ParamField path="path.next_token" type="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.
</ParamField>

<ParamField path="path.pagination_token" type="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.
</ParamField>

<ParamField path="path.sort_order" type="str or None" default="None">
  This order in which to return results.
</ParamField>

<ParamField path="path.tweet_fields" type="List or None" default="None">
  표시할 Tweet 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.expansions" type="List or None" default="None">
  확장할 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.media_fields" type="List or None" default="None">
  표시할 Media 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.poll_fields" type="List or None" default="None">
  표시할 Poll 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.user_fields" type="List or None" default="None">
  표시할 User 필드의 쉼표로 구분된 목록입니다.
</ParamField>

<ParamField path="path.place_fields" type="List or None" default="None">
  표시할 Place 필드의 쉼표로 구분된 목록입니다.
</ParamField>

#### 반환값

`IteratorSearchRecentResponse`
