< BACK

Overview

Available Operations

get

Get News

Example Usage

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("<YOUR_API_KEY_HERE>")
            .build();

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

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

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

Parameters

ParameterTypeRequiredDescription
requestGetNewsRequest:heavy_check_mark:The request object to use for the request.

Response

GetNewsResponse

Errors

Error TypeStatus CodeContent Type
models/errors/APIException4XX, 5XX*/*

getRemoved

Get Removed News

Example Usage

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()) {
            // handle response
        }
    }
}

Parameters

ParameterTypeRequiredDescription
updatedSinceOptional<String>:heavy_minus_sign:Updated Since
pageSizeOptional<Long>:heavy_minus_sign:Page Size
pageOptional<Long>:heavy_minus_sign:Page

Response

GetRemovedNewsResponse

Errors

Error TypeStatus CodeContent Type
models/errors/APIException4XX, 5XX*/*

Was this page helpful?