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

# SpacesClient

Spaces 관련 작업용 Client

이 Client는 X API의 Spaces 엔드포인트와 상호작용하기 위한 메서드를 제공합니다.
인증, 요청 포맷팅, 응답 파싱을 처리하여 Spaces와 관련된 모든 작업을 간편하게 수행할 수 있게 해줍니다.

<div id="constructors">
  ## 생성자
</div>

<div id="constructor">
  ### constructor
</div>

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

새로운 SpacesClient 인스턴스를 생성합니다

<div id="parameters">
  #### 매개변수
</div>

| 이름       | 타입                                                       | 설명                  |
| :------- | :------------------------------------------------------- | :------------------ |
| `client` | [`Client`](/ko/xdks/typescript/reference/classes/Client) | 주 X API Client 인스턴스 |

#### 반환

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

<div id="defined-in">
  #### 정의된 위치
</div>

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

<div id="methods">
  ## 메서드
</div>

<div id="getbyids">
  ### getByIds
</div>

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

ID로 Spaces 조회
여러 개의 Space에 대한 세부 정보를 해당 ID로 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

| Name      | Type                                                            | Description         |
| :-------- | :-------------------------------------------------------------- | :------------------ |
| `ids`     | `any`\[]                                                        | 반환할 Space ID 목록입니다. |
| `options` | `GetByIdsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 `Promise`입니다. `requestOptions.raw`가 true인 경우 원시 `Response`를 반환합니다

#### 정의 위치

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

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

<div id="parameters">
  #### 매개변수
</div>

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

#### 반환

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

<div id="defined-in">
  #### 정의된 위치
</div>

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

***

<div id="getposts">
  ### getPosts
</div>

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

Space 포스트 가져오기
특정 Space에서 공유된 포스트 목록을 해당 Space의 ID를 사용해 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

| Name      | Type                                                            | Description       |
| :-------- | :-------------------------------------------------------------- | :---------------- |
| `id`      | `string`                                                        | 조회할 Space의 ID입니다. |
| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 Promise이며, requestOptions.raw가 true인 경우 원본 Response를 그대로 반환합니다

#### 정의 위치

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

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

<div id="parameters">
  #### 매개변수
</div>

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

#### 반환값

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

<div id="defined-in">
  #### 정의된 위치
</div>

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

***

<div id="search">
  ### search
</div>

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

Spaces 검색
지정된 검색 쿼리와 일치하는 Spaces의 리스트를 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

| Name      | Type                                                          | Description    |
| :-------- | :------------------------------------------------------------ | :------------- |
| `query`   | `string`                                                      | 검색에 사용할 쿼리입니다. |
| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -              |

#### 반환

`Promise`\<`Response`>

API 응답으로 resolve되는 Promise 또는 requestOptions.raw가 true인 경우 원시 Response

<div id="defined-in">
  #### 정의된 위치
</div>

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

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

<div id="parameters">
  #### 매개변수
</div>

| 이름         | type            |
| :--------- | :-------------- |
| `query`    | `string`        |
| `options?` | `SearchOptions` |

#### 반환값

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

<div id="defined-in">
  #### 정의된 위치
</div>

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

***

<div id="getbuyers">
  ### getBuyers
</div>

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

스페이스 티켓 구매자 가져오기
특정 스페이스의 ID를 사용해 해당 스페이스의 티켓을 구매한 사용자들의 목록을 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

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

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 Promise이거나, `requestOptions.raw`가 true인 경우 원본 `Response`입니다

#### 정의 위치

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

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

<div id="parameters">
  #### 매개변수
</div>

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

#### 반환값

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

#### 정의 위치

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

***

<div id="getbyid">
  ### getById
</div>

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

ID로 Space 조회하기
특정 Space를 ID로 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

| Name      | Type                                                           | Description       |
| :-------- | :------------------------------------------------------------- | :---------------- |
| `id`      | `string`                                                       | 조회할 Space의 ID입니다. |
| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 `Promise` 또는 `requestOptions.raw`가 `true`인 경우 원시 `Response` 객체

#### 정의 위치

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

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

<div id="parameters">
  #### 매개변수
</div>

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

#### 반환값

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

<div id="defined-in">
  #### 정의된 위치
</div>

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

***

<div id="getbycreatorids">
  ### getByCreatorIds
</div>

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

생성자 ID로 Spaces 가져오기
지정된 User ID가 생성한 Spaces의 세부 정보를 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

| Name      | Type                                                                   | Description        |
| :-------- | :--------------------------------------------------------------------- | :----------------- |
| `userIds` | `any`\[]                                                               | 검색 대상 사용자들의 id입니다. |
| `options` | `GetByCreatorIdsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                  |

#### 반환

`Promise`\<`Response`>

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

#### 정의 위치

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

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

<div id="parameters">
  #### 매개변수
</div>

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

<div id="returns">
  #### 반환 값
</div>

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

<div id="defined-in">
  #### 정의된 위치
</div>

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