Skip to content

Latest commit

 

History

History
113 lines (77 loc) · 3.55 KB

README.md

File metadata and controls

113 lines (77 loc) · 3.55 KB

News

(news())

Overview

Available Operations

get

Get News

Example Usage

package hello.world;

import com.benzinga.bzclient.Bzclient;
import com.benzinga.bzclient.models.operations.GetNewsRequest;
import com.benzinga.bzclient.models.operations.GetNewsResponse;
import java.lang.Exception;

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

Parameter Type Required Description
request GetNewsRequest ✔️ The request object to use for the request.

Response

GetNewsResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*

getRemoved

Get Removed News

Example Usage

package hello.world;

import com.benzinga.bzclient.Bzclient;
import com.benzinga.bzclient.models.operations.GetRemovedNewsResponse;
import java.lang.Exception;

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

Parameter Type Required Description
updatedSince Optional<String> Updated Since
pageSize Optional<Long> Page Size
page Optional<Long> Page

Response

GetRemovedNewsResponse

Errors

Error Type Status Code Content Type
models/errors/APIException 4XX, 5XX */*