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

# ListsClient

> X API TypeScript SDK の ListsClient クラスのリファレンス。 X API v2 の lists エンドポイントのメソッド、パラメーター、戻り値の型。

lists 操作向けのクライアント

このクライアントは X API の lists エンドポイントと対話するためのメソッドを提供します。認証、リクエストの整形、lists に関連するすべての操作のレスポンス解析を扱います。

## コンストラクター

### コンストラクター

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

新しい lists クライアントインスタンスを作成します

#### パラメーター

| 名前       | 型                                                     | 説明                      |
| :------- | :---------------------------------------------------- | :---------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | メインの X API クライアントインスタンス |

#### 戻り値

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

#### 定義場所

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

## メソッド

### getFollowers

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

Get List followers
次の一覧を取得します: Users who follow a specific List by its ID.

#### パラメーター

| 名前        | 型                                                                   | 説明                  |
| :-------- | :------------------------------------------------------------------ | :------------------ |
| `id`      | `string`                                                            | The ID of the List. |
| `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`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse)>

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### create

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

Create List
Creates a new List for the authenticated user.

#### パラメーター

| 名前        | 型                                                             |
| :-------- | :------------------------------------------------------------ |
| `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`](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse)>

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### getMembers

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

Get List members
次の一覧を取得します: Users who are members of a specific List by its ID.

#### パラメーター

| 名前        | 型                                                                 | 説明                  |
| :-------- | :---------------------------------------------------------------- | :------------------ |
| `id`      | `string`                                                          | The ID of the List. |
| `options` | `GetMembersOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

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

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### addMember

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

Add List member
Adds a User to a specific List by its ID.

#### パラメーター

| 名前        | 型                                                                | 説明                                            |
| :-------- | :--------------------------------------------------------------- | :-------------------------------------------- |
| `id`      | `string`                                                         | The ID of the List for which to add a member. |
| `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`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)>

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### getPosts

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

Get List Posts
次の一覧を取得します: Posts associated with a specific List by its ID.

#### パラメーター

| 名前        | 型                                                               | 説明                  |
| :-------- | :-------------------------------------------------------------- | :------------------ |
| `id`      | `string`                                                        | The ID of the List. |
| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                   |

#### 戻り値

`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`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse)>

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### removeMemberByUserId

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

Remove List member
Removes a User from a specific List by its ID and the User’s ID.

#### パラメーター

| 名前                           | 型        | 説明                                                 |
| :--------------------------- | :------- | :------------------------------------------------- |
| `id`                         | `string` | The ID of the List to remove a member.             |
| `userId`                     | `string` | The ID of User that will be removed from the List. |
| `options`                    | `Object` | -                                                  |
| `options.requestOptions`     | `Object` | -                                                  |
| `options.requestOptions.raw` | `true`   | -                                                  |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

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

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### getById

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

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

#### パラメーター

| 名前        | 型                                                              | 説明                  |
| :-------- | :------------------------------------------------------------- | :------------------ |
| `id`      | `string`                                                       | The ID of the List. |
| `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`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse)>

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### update

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

Update List
Updates the details of a specific List owned by the authenticated user by its ID.

#### パラメーター

| 名前        | 型                                                             | 説明                            |
| :-------- | :------------------------------------------------------------ | :---------------------------- |
| `id`      | `string`                                                      | The ID of the List to modify. |
| `options` | `UpdateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                             |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

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

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

***

### delete

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

Delete List
Deletes a specific List owned by the authenticated user by its ID.

#### パラメーター

| 名前                           | 型        | 説明                            |
| :--------------------------- | :------- | :---------------------------- |
| `id`                         | `string` | The ID of the List to delete. |
| `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`](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse)>

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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