> ## Documentation Index
> Fetch the complete documentation index at: https://docs.benzinga.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Noticias

> news()

[\< VOLVER](/es/sdks/languages/java#news)

<div id="overview">
  ## Descripción general
</div>

<div id="available-operations">
  ### Operaciones disponibles
</div>

* [get](#get) - Obtener noticias
* [getRemoved](#getremoved) - Obtener noticias eliminadas

<div id="get">
  ## get
</div>

Obtener noticias

<div id="example-usage">
  ### Ejemplo de uso
</div>

```java theme={null}
package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.operations.GetNewsRequest;
import org.benzinga.BZClient.models.operations.GetNewsResponse;

public class Application {

    public static void main(String[] args) throws Exception {

        Bzclient sdk = Bzclient.builder()
                .apiKeyAuth("<TU_CLAVE_API_AQUÍ>")
            .build();

        GetNewsRequest req = GetNewsRequest.builder()
                .build();

        GetNewsResponse res = sdk.news().get()
                .request(req)
                .call();

        if (res.twoHundredApplicationJsonApiNewsItems().isPresent()) {
            // handle response
        }
    }
}
```

<div id="parameters">
  ### Parámetros
</div>

| Parámetro | Tipo                                                        | Obligatorio          | Descripción                              |
| --------- | ----------------------------------------------------------- | -------------------- | ---------------------------------------- |
| `request` | [GetNewsRequest](../../models/operations/GetNewsRequest.md) | :heavy\_check\_mark: | El objeto de solicitud que se utilizará. |

<div id="response">
  ### Respuesta
</div>

**[GetNewsResponse](../../models/operations/GetNewsResponse.md)**

<div id="errors">
  ### Errores
</div>

| Tipo de error              | Código de estado HTTP | Tipo de contenido |
| -------------------------- | --------------------- | ----------------- |
| models/errors/APIException | 4XX, 5XX              | */*               |

<div id="getremoved">
  ## getRemoved
</div>

Obtener noticias eliminadas

<div id="example-usage">
  ### Ejemplo de uso
</div>

```java theme={null}
package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.operations.GetRemovedNewsResponse;

public class Application {

    public static void main(String[] args) throws Exception {

        Bzclient sdk = Bzclient.builder()
                .apiKeyAuth("<YOUR_API_KEY_HERE>")
            .build();

        GetRemovedNewsResponse res = sdk.news().getRemoved()
                .updatedSince("<value>")
                .pageSize(948405L)
                .page(766235L)
                .call();

        if (res.twoHundredApplicationJsonApiNewsRemovedItems().isPresent()) {
            // manejar la respuesta
        }
    }
}
```

<div id="parameters">
  ### Parámetros
</div>

| Parámetro      | Tipo                | Obligatorio          | Descripción       |
| -------------- | ------------------- | -------------------- | ----------------- |
| `updatedSince` | *Optional\<String>* | :heavy\_minus\_sign: | Actualizado desde |
| `pageSize`     | *Optional\<Long>*   | :heavy\_minus\_sign: | Tamaño de página  |
| `page`         | *Optional\<Long>*   | :heavy\_minus\_sign: | Página            |

<div id="response">
  ### Respuesta
</div>

**[GetRemovedNewsResponse](../../models/operations/GetRemovedNewsResponse.md)**

<div id="errors">
  ### Errores
</div>

| Tipo de error              | Código de estado | Tipo de contenido |
| -------------------------- | ---------------- | ----------------- |
| models/errors/APIException | 4XX, 5XX         | */*               |
