> ## 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

スペース操作用の Client

この Client は、X API の Spaces エンドポイントを操作するためのメソッドを提供します。認証、リクエストのフォーマット、レスポンスのパースを処理し、Spaces に関連するあらゆる操作をサポートします。

<div id="constructors">
  ## コンストラクタ
</div>

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

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

新しい SpacesClient のインスタンスを作成します

<div id="parameters">
  #### パラメーター
</div>

| Name     | Type                                                     | Description                |
| :------- | :------------------------------------------------------- | :------------------------- |
| `client` | [`Client`](/ja/xdks/typescript/reference/classes/Client) | メインの X API の Client インスタンス |

<div id="returns">
  #### 戻り値
</div>

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

#### 定義元

[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 を取得する\
複数の Spaces の詳細を ID で取得します。

<div id="parameters">
  #### パラメーター
</div>

| Name      | Type                                                            | Description           |
| :-------- | :-------------------------------------------------------------- | :-------------------- |
| `ids`     | `any`\[]                                                        | 返却する Space の id のリスト。 |
| `options` | `GetByIdsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                     |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Response`>

API レスポンスで解決される Promise。requestOptions.raw が true の場合は生の Response。

<div id="defined-in">
  #### 定義場所
</div>

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

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

#### パラメータ

| 名前         | 型                 |
| :--------- | :---------------- |
| `ids`      | `any`\[]          |
| `options?` | `GetByIdsOptions` |

<div id="returns">
  #### 戻り値
</div>

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

#### 定義元

[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`>

スペース内の投稿を取得
特定のスペースで共有された投稿の一覧を、そのスペースのIDを指定して取得します。

<div id="parameters">
  #### パラメーター
</div>

| Name      | Type                                                            | Description       |
| :-------- | :-------------------------------------------------------------- | :---------------- |
| `id`      | `string`                                                        | 取得対象の Space の ID。 |
| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Response`>

API レスポンスで解決される Promise。requestOptions.raw が true の場合は生の Response を返します

<div id="defined-in">
  #### 定義場所
</div>

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

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

<div id="parameters">
  #### パラメーター
</div>

| 名前         | 型                 |
| :--------- | :---------------- |
| `id`       | `string`          |
| `options?` | `GetPostsOptions` |

<div id="returns">
  #### 戻り値
</div>

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

#### 定義元

[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`>

スペースを検索します
指定した検索クエリに一致するスペースの一覧を取得します。

<div id="parameters">
  #### パラメーター
</div>

| Name      | type                                                          | 説明     |
| :-------- | :------------------------------------------------------------ | :----- |
| `query`   | `string`                                                      | 検索クエリ。 |
| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -      |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Response`>

API レスポンスで解決される 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`](/ja/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse)>

#### パラメータ

| 名前         | type            |
| :--------- | :-------------- |
| `query`    | `string`        |
| `options?` | `SearchOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Get2SpacesSearchResponse`](/ja/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`>

Space のチケット購入者を取得します\
特定の Space の id を指定して、その Space のチケットを購入したユーザーのリストを取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名前        | 型                                                                | 説明               |
| :-------- | :--------------------------------------------------------------- | :--------------- |
| `id`      | `string`                                                         | 取得する Space の ID。 |
| `options` | `GetBuyersOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Response`>

API レスポンスを解決値とする 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`](/ja/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse)>

<div id="parameters">
  #### パラメーター
</div>

| 名前         | 型                  |
| :--------- | :----------------- |
| `id`       | `string`           |
| `options?` | `GetBuyersOptions` |

<div id="returns">
  #### 戻り値
</div>

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

<div id="defined-in">
  #### 定義場所
</div>

[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 でスペースを取得
指定した id のスペースの詳細を取得します。

<div id="parameters">
  #### パラメーター
</div>

| 名前        | 型                                                              | 説明               |
| :-------- | :------------------------------------------------------------- | :--------------- |
| `id`      | `string`                                                       | 取得する Space の ID。 |
| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Response`>

API レスポンスで解決される Promise。requestOptions.raw が true の場合は生の Response。

<div id="defined-in">
  #### 定義場所
</div>

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

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

#### パラメータ

| 名前         | 型                |
| :--------- | :--------------- |
| `id`       | `string`         |
| `options?` | `GetByIdOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Get2SpacesIdResponse`](/ja/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を取得します\
指定したユーザーIDが作成したSpacesの詳細を取得します。

#### パラメータ

| Name      | Type                                                                   | Description     |
| :-------- | :--------------------------------------------------------------------- | :-------------- |
| `userIds` | `any`\[]                                                               | 検索対象とするユーザーのid。 |
| `options` | `GetByCreatorIdsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -               |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Response`>

API レスポンスで解決される Promise。requestOptions.raw が true の場合は生の Response

<div id="defined-in">
  #### 定義場所
</div>

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

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

#### パラメータ

| 名前         | 型                        |
| :--------- | :----------------------- |
| `userIds`  | `any`\[]                 |
| `options?` | `GetByCreatorIdsOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Get2SpacesByCreatorIdsResponse`](/ja/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)
