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

# SpacesClient

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

## SpacesClient

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

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

Spaces 작업을 위한 클라이언트

## 생성자

### `__init__`

#### 매개변수

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

### `get_buyers`

Get Space ticket buyers
Retrieves a list of Users who purchased tickets to a specific Space by its ID.

#### 매개변수

<ParamField path="path.id" type="str">
  The ID of the Space to be retrieved.
</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.max_results" type="int or None" default="None">
  결과의 최대 개수입니다.
</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>

#### 반환값

`IteratorGetBuyersResponse`

### `get_by_creator_ids`

Get Spaces by creator IDs
Retrieves details of Spaces created by specified User IDs.

#### 매개변수

<ParamField path="path.user_ids" type="List">
  The IDs of Users to search through.
</ParamField>

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

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

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

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

#### 반환값

`GetByCreatorIdsResponse` - 응답 데이터

### `get_by_id`

Get space by ID
Retrieves details of a specific space by its ID.

#### 매개변수

<ParamField path="path.id" type="str">
  The ID of the Space to be retrieved.
</ParamField>

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

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

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

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

#### 반환값

`GetByIdResponse` - 응답 데이터

### `get_by_ids`

Get Spaces by IDs
Retrieves details of multiple Spaces by their IDs.

#### 매개변수

<ParamField path="path.ids" type="List">
  The list of Space IDs to return.
</ParamField>

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

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

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

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

#### 반환값

`GetByIdsResponse` - 응답 데이터

### `get_posts`

Get Space Posts
Retrieves a list of Posts shared in a specific Space by its ID.

#### 매개변수

<ParamField path="path.id" type="str">
  The ID of the Space to be retrieved.
</ParamField>

<ParamField path="path.max_results" type="int or None" default="None">
  The number of Posts to fetch from the provided space. If not provided, the value will default to the maximum of 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>

#### 반환값

`GetPostsResponse` - 응답 데이터

### `search`

Search Spaces
Retrieves a list of Spaces matching the specified search query.

#### 매개변수

<ParamField path="path.query" type="str">
  The search query.
</ParamField>

<ParamField path="path.state" type="str or None" default="None">
  The state of Spaces to search for.
</ParamField>

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

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

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

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

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

#### 반환값

`SearchResponse` - 응답 데이터
