Skip to main content
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 Creates a new general client instance

Parameters

NameTypeDescription
clientClientThe main X API client instance

Returns

GeneralClient

Defined in

general/client.ts:42

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)

Parameters

NameType
optionsObject
options.requestOptionsObject
options.requestOptions.rawtrue

Returns

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

Defined in

general/client.ts:83 getOpenApiSpec(): Promise<GetOpenApiSpecResponse>

Returns

Promise<GetOpenApiSpecResponse>

Defined in

general/client.ts:92