> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SpacesClient

> X API TypeScript SDK의 SpacesClient 클래스에 대한 레퍼런스. X API v2 spaces 엔드포인트에 대한 메서드, 매개변수 및 반환 타입.

spaces 작업을 위한 클라이언트

이 클라이언트는 X API의 spaces 엔드포인트와 상호작용하기 위한 메서드를
제공합니다. 모든 spaces 관련 작업에 대한 인증, 요청 형식화 및 응답
파싱을 처리합니다.

## 생성자

### constructor

• **new SpacesClient**(`client`): [`SpacesClient`](/xdks/typescript/reference/classes/SpacesClient)

새 spaces 클라이언트 인스턴스를 생성합니다

#### 매개변수

| 이름       | 타입                                                    | 설명                  |
| :------- | :---------------------------------------------------- | :------------------ |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | 메인 X API 클라이언트 인스턴스 |

#### 반환값

[`SpacesClient`](/xdks/typescript/reference/classes/SpacesClient)

#### 정의 위치

[spaces/client.ts:316](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L316)

## 메서드

### getByIds

▸ **getByIds**(`ids`, `options`): `Promise`\<`Response`>

Get Spaces by IDs
ID로 여러 Space의 세부 정보를 검색합니다.

#### 매개변수

| 이름        | 타입                                                              | 설명                  |
| :-------- | :-------------------------------------------------------------- | :------------------ |
| `ids`     | `any`\[]                                                        | 반환할 Space ID 목록입니다. |
| `options` | `GetByIdsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[spaces/client.ts:361](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L361)

▸ **getByIds**(`ids`, `options?`): `Promise`\<[`Get2SpacesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse)>

#### 매개변수

| 이름         | 타입                |
| :--------- | :---------------- |
| `ids`      | `any`\[]          |
| `options?` | `GetByIdsOptions` |

#### 반환값

`Promise`\<[`Get2SpacesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse)>

#### 정의 위치

[spaces/client.ts:374](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L374)

***

### getPosts

▸ **getPosts**(`id`, `options`): `Promise`\<`Response`>

Get Space Posts
ID로 특정 Space에서 공유된 Posts 목록을 검색합니다.

#### 매개변수

| 이름        | 타입                                                              | 설명                |
| :-------- | :-------------------------------------------------------------- | :---------------- |
| `id`      | `string`                                                        | 검색할 Space의 ID입니다. |
| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[spaces/client.ts:572](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L572)

▸ **getPosts**(`id`, `options?`): `Promise`\<[`Get2SpacesIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse)>

#### 매개변수

| 이름         | 타입                |
| :--------- | :---------------- |
| `id`       | `string`          |
| `options?` | `GetPostsOptions` |

#### 반환값

`Promise`\<[`Get2SpacesIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse)>

#### 정의 위치

[spaces/client.ts:585](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L585)

***

### search

▸ **search**(`query`, `options`): `Promise`\<`Response`>

Search Spaces
지정된 검색 쿼리와 일치하는 Spaces 목록을 검색합니다.

#### 매개변수

| 이름        | 타입                                                            | 설명        |
| :-------- | :------------------------------------------------------------ | :-------- |
| `query`   | `string`                                                      | 검색 쿼리입니다. |
| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -         |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[spaces/client.ts:835](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L835)

▸ **search**(`query`, `options?`): `Promise`\<[`Get2SpacesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse)>

#### 매개변수

| 이름         | 타입              |
| :--------- | :-------------- |
| `query`    | `string`        |
| `options?` | `SearchOptions` |

#### 반환값

`Promise`\<[`Get2SpacesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse)>

#### 정의 위치

[spaces/client.ts:848](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L848)

***

### getBuyers

▸ **getBuyers**(`id`, `options`): `Promise`\<`Response`>

Get Space ticket buyers
ID로 특정 Space에 대한 티켓을 구매한 사용자 목록을 검색합니다.

#### 매개변수

| 이름        | 타입                                                               | 설명                |
| :-------- | :--------------------------------------------------------------- | :---------------- |
| `id`      | `string`                                                         | 검색할 Space의 ID입니다. |
| `options` | `GetBuyersOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[spaces/client.ts:1080](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1080)

▸ **getBuyers**(`id`, `options?`): `Promise`\<[`Get2SpacesIdBuyersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse)>

#### 매개변수

| 이름         | 타입                 |
| :--------- | :----------------- |
| `id`       | `string`           |
| `options?` | `GetBuyersOptions` |

#### 반환값

`Promise`\<[`Get2SpacesIdBuyersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse)>

#### 정의 위치

[spaces/client.ts:1093](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1093)

***

### getById

▸ **getById**(`id`, `options`): `Promise`\<`Response`>

Get space by ID
ID로 특정 space의 세부 정보를 검색합니다.

#### 매개변수

| 이름        | 타입                                                             | 설명                |
| :-------- | :------------------------------------------------------------- | :---------------- |
| `id`      | `string`                                                       | 검색할 Space의 ID입니다. |
| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[spaces/client.ts:1293](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1293)

▸ **getById**(`id`, `options?`): `Promise`\<[`Get2SpacesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse)>

#### 매개변수

| 이름         | 타입               |
| :--------- | :--------------- |
| `id`       | `string`         |
| `options?` | `GetByIdOptions` |

#### 반환값

`Promise`\<[`Get2SpacesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse)>

#### 정의 위치

[spaces/client.ts:1306](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1306)

***

### getByCreatorIds

▸ **getByCreatorIds**(`userIds`, `options`): `Promise`\<`Response`>

Get Spaces by creator IDs
지정된 사용자 ID가 생성한 Spaces의 세부 정보를 검색합니다.

#### 매개변수

| 이름        | 타입                                                                     | 설명              |
| :-------- | :--------------------------------------------------------------------- | :-------------- |
| `userIds` | `any`\[]                                                               | 검색할 사용자의 ID입니다. |
| `options` | `GetByCreatorIdsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -               |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[spaces/client.ts:1495](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1495)

▸ **getByCreatorIds**(`userIds`, `options?`): `Promise`\<[`Get2SpacesByCreatorIdsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse)>

#### 매개변수

| 이름         | 타입                       |
| :--------- | :----------------------- |
| `userIds`  | `any`\[]                 |
| `options?` | `GetByCreatorIdsOptions` |

#### 반환값

`Promise`\<[`Get2SpacesByCreatorIdsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse)>

#### 정의 위치

[spaces/client.ts:1508](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1508)
