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

# ListsClient

リスト操作用の Client

この Client は、X API のリスト用エンドポイントとやり取りするためのメソッドを提供します。認証、リクエストのフォーマット、レスポンスの解析など、リスト関連のあらゆる操作を処理します。

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

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

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

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

#### パラメーター

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

#### 戻り値

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

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

[lists/client.ts:294](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L294)

<div id="methods">
  ## メソッド
</div>

<div id="getfollowers">
  ### getFollowers
</div>

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

リストのフォロワーを取得します。\
特定のリストをフォローしているユーザーの一覧を、その ID を指定して取得します。

#### パラメーター

| 名前        | 型                                                                   | 説明      |
| :-------- | :------------------------------------------------------------------ | :------ |
| `id`      | `string`                                                            | リストのID。 |
| `options` | `GetFollowersOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -       |

#### 戻り値

`Promise`\<`Response`>

API レスポンスを返す Promise。requestOptions.raw が true の場合は生の Response

#### 定義場所

[lists/client.ts:339](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L339)

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

#### パラメーター

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

#### 戻り値

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

#### 定義元

[lists/client.ts:352](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L352)

***

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

▸ **create**(`options`): `Promise`\<`Response`>

リストの作成
認証済みユーザーの新しいリストを作成します。

#### パラメータ

| 名前        | type                                                          |
| :-------- | :------------------------------------------------------------ |
| `options` | `CreateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンスを返す Promise。`requestOptions.raw` が `true` の場合は生の `Response`

#### 定義元

[lists/client.ts:560](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L560)

▸ **create**(`options?`): `Promise`\<[`ListCreateResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse)>

#### パラメータ

| 名前         | type            |
| :--------- | :-------------- |
| `options?` | `CreateOptions` |

#### 戻り値

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

#### 定義場所

[lists/client.ts:569](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L569)

***

<div id="getmembers">
  ### getMembers
</div>

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

List メンバーを取得します\
指定した List の id によって、その List に含まれるユーザーを取得します。

#### パラメータ

| Name      | Type                                                              | Description |
| :-------- | :---------------------------------------------------------------- | :---------- |
| `id`      | `string`                                                          | リストのID。     |
| `options` | `GetMembersOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -           |

#### 戻り値

`Promise`\<`Response`>

API レスポンス、もしくは requestOptions.raw が true の場合は生の Response を返す Promise

#### 定義場所

[lists/client.ts:665](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L665)

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

#### パラメータ

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

#### 戻り値

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

#### 定義場所

[lists/client.ts:678](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L678)

***

<div id="addmember">
  ### addMember
</div>

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

リストにメンバーを追加する\
指定した id のリストにユーザーを追加します。

#### パラメーター

| Name      | Type                                                             | Description      |
| :-------- | :--------------------------------------------------------------- | :--------------- |
| `id`      | `string`                                                         | メンバーを追加するリストのID。 |
| `options` | `AddMemberOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                |

#### 戻り値

`Promise`\<`Response`>

API レスポンスを解決値とする Promise。requestOptions.raw が true の場合は生の Response

#### 定義場所

[lists/client.ts:890](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L890)

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

#### パラメータ

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

#### 戻り値

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

#### 定義元

[lists/client.ts:903](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L903)

***

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

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

Get List Posts
特定のリストIDに紐づく投稿一覧を取得します。

#### パラメーター

| 名前        | 型                                                               | 説明      |
| :-------- | :-------------------------------------------------------------- | :------ |
| `id`      | `string`                                                        | リストのID。 |
| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -       |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンスを返す Promise。requestOptions.raw が true の場合は生の Response を返します。

#### 定義場所

[lists/client.ts:1011](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1011)

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

[lists/client.ts:1024](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1024)

***

<div id="removememberbyuserid">
  ### removeMemberByUserId
</div>

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

リストのメンバーを削除する\
特定のリストのidとユーザーのidを指定して、そのリストからユーザーを削除します。

<div id="parameters">
  #### Parameters
</div>

| Name                         | Type     | Description       |
| :--------------------------- | :------- | :---------------- |
| `id`                         | `string` | メンバーを削除するリストのID。  |
| `userId`                     | `string` | リストから削除するユーザーのID。 |
| `options`                    | `Object` | -                 |
| `options.requestOptions`     | `Object` | -                 |
| `options.requestOptions.raw` | `true`   | -                 |

#### 返り値

`Promise`\<`Response`>

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

#### 定義場所

[lists/client.ts:1303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1303)

▸ **removeMemberByUserId**(`id`, `userId`): `Promise`\<[`ListMutateResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)>

#### パラメータ

| 名前       | 型        |
| :------- | :------- |
| `id`     | `string` |
| `userId` | `string` |

#### 戻り値

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

#### 定義場所

[lists/client.ts:1320](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1320)

***

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

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

ID でリストを取得\
指定した ID のリストの詳細を取得します。

#### パラメーター

| 名前        | 型                                                              | 説明      |
| :-------- | :------------------------------------------------------------- | :------ |
| `id`      | `string`                                                       | リストのID。 |
| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -       |

#### 戻り値

`Promise`\<`Response`>

API レスポンスで解決される Promise、または requestOptions.raw が true の場合は生の Response オブジェクト

#### 定義場所

[lists/client.ts:1423](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1423)

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

[lists/client.ts:1436](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1436)

***

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

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

リストを更新する\
認証済みユーザーが所有する特定のリストの詳細情報を、その識別子 (id) を指定して更新します。

<div id="parameters">
  #### Parameters
</div>

| Name      | Type                                                          | Description  |
| :-------- | :------------------------------------------------------------ | :----------- |
| `id`      | `string`                                                      | 変更対象のリストのID。 |
| `options` | `UpdateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -            |

#### 戻り値

`Promise`\<`Response`>

API レスポンス、または requestOptions.raw が true の場合は生の Response オブジェクトに解決される Promise

#### 定義場所

[lists/client.ts:1610](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1610)

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

[lists/client.ts:1623](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1623)

***

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

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

リストを削除する\
認証済みユーザーが所有する特定のリストを、その ID を指定して削除します。

#### パラメータ

| Name                         | Type     | Description |
| :--------------------------- | :------- | :---------- |
| `id`                         | `string` | 削除するリストのID。 |
| `options`                    | `Object` | -           |
| `options.requestOptions`     | `Object` | -           |
| `options.requestOptions.raw` | `true`   | -           |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義元

[lists/client.ts:1731](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1731)

▸ **delete**(`id`): `Promise`\<[`ListDeleteResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse)>

#### パラメーター

| 名前   | 型        |
| :--- | :------- |
| `id` | `string` |

#### 戻り値

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

#### 定義場所

[lists/client.ts:1744](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1744)
