> ## 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.

# TrendsClient

> X API TypeScript SDK の TrendsClient クラスのリファレンス。 X API v2 の trends エンドポイントのメソッド、パラメーター、戻り値の型。

trends 操作向けのクライアント

このクライアントは X API の trends エンドポイントと対話するためのメソッドを提供します。認証、リクエストの整形、trends に関連するすべての操作のレスポンス解析を扱います。

zed]\(/xdks/typescript/reference/classes/TrendsClient#getpersonalized)

## コンストラクター

### コンストラクター

• **new TrendsClient**(`client`): [`TrendsClient`](/xdks/typescript/reference/classes/TrendsClient)

新しい trends クライアントインスタンスを作成します

#### パラメーター

| 名前       | 型                                                     | 説明                      |
| :------- | :---------------------------------------------------- | :---------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | メインの X API クライアントインスタンス |

#### 戻り値

[`TrendsClient`](/xdks/typescript/reference/classes/TrendsClient)

#### 定義場所

[trends/client.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L90)

## メソッド

### getByWoeid

▸ **getByWoeid**(`woeid`, `options`): `Promise`\<`Response`>

Get Trends by WOEID
Retrieves trending topics for a specific location identified by its WOEID.

#### パラメーター

| 名前        | 型                                                                 | 説明                                            |
| :-------- | :---------------------------------------------------------------- | :-------------------------------------------- |
| `woeid`   | `number`                                                          | The WOEID of the place to lookup a trend for. |
| `options` | `GetByWoeidOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                             |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[trends/client.ts:135](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L135)

▸ **getByWoeid**(`woeid`, `options?`): `Promise`\<[`Get2TrendsByWoeidWoeidResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse)>

#### パラメーター

| 名前         | 型                   |
| :--------- | :------------------ |
| `woeid`    | `number`            |
| `options?` | `GetByWoeidOptions` |

#### 戻り値

`Promise`\<[`Get2TrendsByWoeidWoeidResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse)>

#### 定義場所

[trends/client.ts:148](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L148)

***

### getPersonalized

▸ **getPersonalized**(`options`): `Promise`\<`Response`>

Get personalized Trends
Retrieves personalized trending topics for the authenticated user.

#### パラメーター

| 名前        | 型                                                                      |
| :-------- | :--------------------------------------------------------------------- |
| `options` | `GetPersonalizedOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[trends/client.ts:285](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L285)

▸ **getPersonalized**(`options?`): `Promise`\<[`Get2UsersPersonalizedTrendsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse)>

#### パラメーター

| 名前         | 型                        |
| :--------- | :----------------------- |
| `options?` | `GetPersonalizedOptions` |

#### 戻り値

`Promise`\<[`Get2UsersPersonalizedTrendsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse)>

#### 定義場所

[trends/client.ts:294](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L294)
