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 compliance operations
This client provides methods for interacting with the compliance endpoints
of the X API. It handles authentication, request formatting, and response
parsing for all compliance related operations.
Constructors
constructor
• new ComplianceClient(client): ComplianceClient
Creates a new compliance client instance
Parameters
| Name | Type | Description |
|---|
client | Client | The main X API client instance |
Returns
ComplianceClient
Defined in
compliance/client.ts:93
Methods
getJobsById
▸ getJobsById(id, options): Promise<Response>
Get Compliance Job by ID
Retrieves details of a specific Compliance Job by its ID.
Parameters
| Name | Type | Description |
|---|
id | string | The ID of the Compliance Job to retrieve. |
options | GetJobsByIdOptions & { requestOptions: { raw: true } } | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
compliance/client.ts:138
▸ getJobsById(id, options?): Promise<Get2ComplianceJobsIdResponse>
Parameters
| Name | Type |
|---|
id | string |
options? | GetJobsByIdOptions |
Returns
Promise<Get2ComplianceJobsIdResponse>
Defined in
compliance/client.ts:151
getJobs
▸ getJobs(type, options): Promise<Response>
Get Compliance Jobs
Retrieves a list of Compliance Jobs filtered by job type and optional status.
Parameters
| Name | Type | Description |
|---|
type | string | Type of Compliance Job to list. |
options | GetJobsOptions & { requestOptions: { raw: true } } | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
compliance/client.ts:273
▸ getJobs(type, options?): Promise<Get2ComplianceJobsResponse>
Parameters
| Name | Type |
|---|
type | string |
options? | GetJobsOptions |
Returns
Promise<Get2ComplianceJobsResponse>
Defined in
compliance/client.ts:286
createJobs
▸ createJobs(body, options): Promise<Response>
Create Compliance Job
Creates a new Compliance Job for the specified job type.
Parameters
| Name | Type | Description |
|---|
body | CreateComplianceJobRequest | A request to create a new batch compliance job. |
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
compliance/client.ts:430
▸ createJobs(body): Promise<CreateComplianceJobResponse>
Parameters
Returns
Promise<CreateComplianceJobResponse>
Defined in
compliance/client.ts:441