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

# ConnectionsClient

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

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

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

## コンストラクター

### コンストラクター

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

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

[connections/client.ts:88](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L88)

## メソッド

### getConnectionHistory

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

Get Connection History
Returns active and historical streaming connections with disconnect reasons for the authenticated application.

#### パラメーター

| 名前        | 型                                                                           |
| :-------- | :-------------------------------------------------------------------------- |
| `options` | `GetConnectionHistoryOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

[connections/client.ts:129](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L129)

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

[connections/client.ts:138](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L138)

***

### deleteAll

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

Terminate all connections
Terminates all active streaming connections for the authenticated application.

#### パラメーター

| 名前                           | 型        |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

[connections/client.ts:318](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L318)

▸ **deleteAll**(): `Promise`\<[`KillAllConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse)>

#### 戻り値

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

#### 定義場所

[connections/client.ts:327](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L327)
