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.
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
| Name | Type | Description |
|---|
client | Client | The main X API client instance |
Returns
UsageClient
Defined in
usage/client.ts:68
Methods
get
▸ get(options): Promise<Response>
Get usage
Retrieves usage statistics for Posts over a specified number of days.
Parameters
| Name | Type |
|---|
options | GetOptions & { requestOptions: { raw: true } } |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
usage/client.ts:109
▸ get(options?): Promise<Get2UsageTweetsResponse>
Parameters
| Name | Type |
|---|
options? | GetOptions |
Returns
Promise<Get2UsageTweetsResponse>
Defined in
usage/client.ts:118