Skip to main content
Client for usage operations This client provides methods for interacting with the usage endpoints of the X API. It handles authentication, request formatting, and response parsing for all usage related operations.

Constructors

constructor

new UsageClient(client): UsageClient Creates a new usage client instance

Parameters

NameTypeDescription
clientClientThe main X API client instance

Returns

UsageClient

Defined in

usage/client.ts:49

Methods

get

get(options?): Promise<Get2UsageTweetsResponse> Get usage Retrieves usage statistics for Posts over a specified number of days.

Parameters

NameType
optionsGetOptions

Returns

Promise<Get2UsageTweetsResponse> Promise resolving to the API response

Defined in

usage/client.ts:62