Constructors
constructor
• new NewsClient(client): NewsClient
Creates a new news client instance
Parameters
| Name | Type | Description |
|---|---|---|
client | Client | The main X API client instance |
Returns
NewsClient
Defined in
news/client.ts:77Methods
get
▸ get(id, options?): Promise<Get2NewsIdResponse>
Get news stories by ID
Retrieves news story by its ID.
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The ID of the news story. |
options | GetOptions | - |
Returns
Promise<Get2NewsIdResponse>
Promise resolving to the API response
Defined in
news/client.ts:123search
▸ search(query, options?): Promise<Get2NewsSearchResponse>
Search News
Retrieves a list of News stories matching the specified search query.
Parameters
| Name | Type | Description |
|---|---|---|
query | string | The search query. |
options | SearchOptions | - |
Returns
Promise<Get2NewsSearchResponse>
Promise resolving to the API response