Constructors
constructor
• new CommunityNotesClient(client): CommunityNotesClient
Creates a new community notes client instance
Parameters
| Name | Type | Description | 
|---|---|---|
client | Client | The main X API client instance | 
Returns
CommunityNotesClient
Defined in
community_notes/client.ts:120Methods
searchEligiblePosts
▸ searchEligiblePosts(testMode, options?): Promise<Get2NotesSearchPostsEligibleForNotesResponse>
Search for Posts Eligible for Community Notes
Returns all the posts that are eligible for community notes.
Parameters
| Name | Type | Description | 
|---|---|---|
testMode | boolean | If true, return a list of posts that are for the test. If false, return a list of posts that the bots can write proposed notes on the product. | 
options | SearchEligiblePostsOptions | - | 
Returns
Promise<Get2NotesSearchPostsEligibleForNotesResponse>
Promise resolving to the API response
Defined in
community_notes/client.ts:137searchWritten
▸ searchWritten(testMode, options?): Promise<Get2NotesSearchNotesWrittenResponse>
Search for Community Notes Written
Returns all the community notes written by the user.
Parameters
| Name | Type | Description | 
|---|---|---|
testMode | boolean | If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product. | 
options | SearchWrittenOptions | - | 
Returns
Promise<Get2NotesSearchNotesWrittenResponse>
Promise resolving to the API response
Defined in
community_notes/client.ts:231delete
▸ delete(id): Promise<DeleteNoteResponse>
Delete a Community Note
Deletes a community note.
Parameters
| Name | Type | Description | 
|---|---|---|
id | string | The community note id to delete. | 
Returns
Promise<DeleteNoteResponse>
Promise resolving to the API response
Defined in
community_notes/client.ts:295evaluate
▸ evaluate(options?): Promise<EvaluateNoteResponse>
Evaluate a Community Note
Endpoint to evaluate a community note.
Parameters
| Name | Type | 
|---|---|
options | EvaluateOptions | 
Returns
Promise<EvaluateNoteResponse>
Promise resolving to the API response
Defined in
community_notes/client.ts:329create
▸ create(options?): Promise<CreateNoteResponse>
Create a Community Note
Creates a community note endpoint for LLM use case.
Parameters
| Name | Type | 
|---|---|
options | CreateOptions | 
Returns
Promise<CreateNoteResponse>
Promise resolving to the API response