> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-24fef6d1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GeneralClient

> Reference for the GeneralClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 general endpoints.

Client for general operations

This client provides methods for interacting with the general endpoints
of the X API. It handles authentication, request formatting, and response
parsing for all general related operations.

## Constructors

### constructor

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

Creates a new general client instance

#### Parameters

| Name | Type | Description |
| :- | :- | :- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance |

#### Returns

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

#### Defined in

[general/client.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/general/client.ts#L42)

## Methods

### getOpenApiSpec

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

Get OpenAPI Spec.
Retrieves the full OpenAPI Specification in JSON format. (See [https://github.com/OAI/OpenAPI-Specification/blob/master/README.md](https://github.com/OAI/OpenAPI-Specification/blob/master/README.md))

#### Parameters

| Name | Type |
| :- | :- |
| `options` | `Object` |
| `options.requestOptions` | `Object` |
| `options.requestOptions.raw` | `true` |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[general/client.ts:83](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/general/client.ts#L83)

▸ **getOpenApiSpec**(): `Promise`\<[`GetOpenApiSpecResponse`](/xdks/typescript/reference/modules/General#getopenapispecresponse)>

#### Returns

`Promise`\<[`GetOpenApiSpecResponse`](/xdks/typescript/reference/modules/General#getopenapispecresponse)>

#### Defined in

[general/client.ts:92](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/general/client.ts#L92)
