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

> Referência para a classe ConnectionsClient no SDK TypeScript da X API. Métodos, parâmetros e tipos de retorno para os endpoints connections da X API v2.

Client para operações de connections

Este client fornece métodos para interagir com os endpoints connections
da X API. Ele cuida da autenticação, formatação de requisição e análise
de resposta para todas as operações relacionadas a connections.

## Construtores

### constructor

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

Cria uma nova instância do client connections

#### Parâmetros

| Nome     | Tipo                                                  | Descrição                                |
| :------- | :---------------------------------------------------- | :--------------------------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | A instância principal do client da X API |

#### Retorna

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

#### Definido em

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

## Métodos

### getConnectionHistory

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

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

#### Parâmetros

| Nome      | Tipo                                                                        |
| :-------- | :-------------------------------------------------------------------------- |
| `options` | `GetConnectionHistoryOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

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

#### Parâmetros

| Nome       | Tipo                          |
| :--------- | :---------------------------- |
| `options?` | `GetConnectionHistoryOptions` |

#### Retorna

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

#### Definido em

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

#### Parâmetros

| Nome                         | Tipo     |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

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

#### Retorna

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

#### Definido em

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