Documentation Index
Fetch the complete documentation index at: https://benzinga-2-locadex-parallel-main.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
< VOLVER
Obtener noticias
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
}
}
}
| Parámetro | Tipo | Obligatorio | Descripción |
|---|
request | GetNewsRequest | :heavy_check_mark: | El objeto de solicitud que se utilizará. |
GetNewsResponse
| Tipo de error | Código de estado HTTP | Tipo de contenido |
|---|
| models/errors/APIException | 4XX, 5XX | / |
Obtener noticias eliminadas
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
}
}
}
| 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 |
GetRemovedNewsResponse
| Tipo de error | Código de estado | Tipo de contenido |
|---|
| models/errors/APIException | 4XX, 5XX | / |