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

# ConnectionsClient

connections に関する各種操作を行うための Client

この Client は、X API の connections エンドポイントとやり取りするためのメソッドを提供します。認証、リクエストの整形、レスポンスの解析を行い、connections に関連するすべての操作を処理します。

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

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

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

新しい `ConnectionsClient` インスタンスを作成します

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

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

#### 戻り値

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

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

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

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

<div id="getconnectionhistory">
  ### getConnectionHistory
</div>

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

接続履歴の取得\
認証済みアプリケーションに対する現在および過去のストリーミング接続と、その切断理由を返します。

#### パラメータ

| パラメータ名    | 型                                                                           |
| :-------- | :-------------------------------------------------------------------------- |
| `options` | `GetConnectionHistoryOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

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

`Promise`\<`Response`>

API レスポンス、または `requestOptions.raw` が `true` の場合は生の `Response` を解決する `Promise`

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

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

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

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

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

#### 戻り値

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

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

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

***

<div id="deleteall">
  ### deleteAll
</div>

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

すべての接続を終了します\
認証された App のアクティブなストリーミング接続をすべて終了します。

#### パラメータ

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

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

`Promise`\<`Response`>

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

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

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

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

#### 戻り値

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

#### 定義元

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