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

> Referência para a classe TrendsClient no SDK TypeScript da X API. Métodos, parâmetros e tipos de retorno para os endpoints trends da X API v2.

Client para operações de trends

Este client fornece métodos para interagir com os endpoints trends
da X API. Ele cuida da autenticação, formatação de requisição e análise
de resposta para todas as operações relacionadas a trends.

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

## Construtores

### constructor

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

Cria uma nova instância do client trends

#### Parâmetros

| Nome     | Tipo                                                  | Descrição                                |
| :------- | :---------------------------------------------------- | :--------------------------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | A instância principal do client da X API |

#### Retorna

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

#### Definido em

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

## Métodos

### getByWoeid

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

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

#### Parâmetros

| Nome      | Tipo                                                              | Descrição                                     |
| :-------- | :---------------------------------------------------------------- | :-------------------------------------------- |
| `woeid`   | `number`                                                          | The WOEID of the place to lookup a trend for. |
| `options` | `GetByWoeidOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                             |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[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)>

#### Parâmetros

| Nome       | Tipo                |
| :--------- | :------------------ |
| `woeid`    | `number`            |
| `options?` | `GetByWoeidOptions` |

#### Retorna

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

#### Definido em

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

#### Parâmetros

| Nome      | Tipo                                                                   |
| :-------- | :--------------------------------------------------------------------- |
| `options` | `GetPersonalizedOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### Retorna

`Promise`\<`Response`>

Promise que resolve para a resposta da API, ou Response bruto se requestOptions.raw for true

#### Definido em

[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)>

#### Parâmetros

| Nome       | Tipo                     |
| :--------- | :----------------------- |
| `options?` | `GetPersonalizedOptions` |

#### Retorna

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

#### Definido em

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