Documentation Index
Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Cliente para operaciones de noticias
Este cliente proporciona métodos para interactuar con los endpoints de noticias
de la X API. Se encarga de la autenticación, el formateo de las solicitudes y el análisis
de las respuestas para todas las operaciones relacionadas con noticias.
• new NewsClient(client): NewsClient
Crea una nueva instancia de NewsClient
| Nombre | Type | Descripción |
|---|
client | Client | La instancia principal de Client para X API |
NewsClient
news/client.ts:96
▸ get(id, options): Promise<Response>
Obtener noticias por ID
Recupera una noticia por su ID.
| Nombre | Tipo | Descripción |
|---|
id | string | El identificador de la noticia. |
options | GetOptions & { requestOptions: { raw: true } } | - |
Returns
Promise<Response>
Promesa que se resuelve con la respuesta de la API o con el objeto Response sin procesar si requestOptions.raw es true
news/client.ts:141
▸ get(id, options?): Promise<Get2NewsIdResponse>
| Nombre | Tipo |
|---|
id | string |
options? | GetOptions |
Promise<Get2NewsIdResponse>
news/client.ts:154
▸ search(query, options): Promise<Response>
Buscar noticias
Recupera una lista de noticias que coinciden con la consulta de búsqueda especificada.
| Nombre | Type | Descripción |
|---|
query | string | La consulta de búsqueda. |
options | SearchOptions & { requestOptions: { raw: true } } | - |
Returns
Promise<Response>
Promesa que se resuelve con la respuesta de la API, o un objeto Response sin procesar si requestOptions.raw es true
news/client.ts:288
▸ search(query, options?): Promise<Get2NewsSearchResponse>
| Nombre | Type |
|---|
query | string |
options? | SearchOptions |
Promise<Get2NewsSearchResponse>
news/client.ts:301