Constructors
constructor
• new TrendsClient(client): TrendsClient
Creates a new trends client instance
Parameters
| Name | Type | Description |
|---|---|---|
client | Client | The main X API client instance |
Returns
TrendsClient
Defined in
trends/client.ts:93Methods
getPersonalized
▸ getPersonalized(options?): Promise<Get2UsersPersonalizedTrendsResponse>
Get personalized Trends
Retrieves personalized trending topics for the authenticated user.
Parameters
| Name | Type |
|---|---|
options | GetPersonalizedOptions |
Returns
Promise<Get2UsersPersonalizedTrendsResponse>
Promise resolving to the API response
Defined in
trends/client.ts:135getByWoeid
▸ getByWoeid(woeid, options?): Promise<Get2TrendsByWoeidWoeidResponse>
Get Trends by WOEID
Retrieves trending topics for a specific location identified by its WOEID.
Parameters
| Name | Type | Description |
|---|---|---|
woeid | number | The WOEID of the place to lookup a trend for. |
options | GetByWoeidOptions | - |
Returns
Promise<Get2TrendsByWoeidWoeidResponse>
Promise resolving to the API response
Defined in
trends/client.ts:207getAi
▸ getAi(id, options?): Promise<Get2AiTrendsIdResponse>
Get AI Trends by ID
Retrieves an AI trend by its ID.
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The ID of the ai trend. |
options | GetAiOptions | - |
Returns
Promise<Get2AiTrendsIdResponse>
Promise resolving to the API response