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.
< 戻る
ニュースの取得
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()) {
// レスポンスを処理する
}
}
}
| Parameter | Type | Required | Description |
|---|
request | GetNewsRequest | :heavy_check_mark: | このリクエストで使用するリクエストオブジェクト。 |
GetNewsResponse
| エラー種別 | ステータスコード | Content-Type |
|---|
| models/errors/APIException | 4XX, 5XX | / |
削除済みニュースを取得
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()) {
// レスポンスを処理する
}
}
}
| パラメータ名 | 型 | 必須 | 説明 |
|---|
updatedSince | Optional<String> | :heavy_minus_sign: | この日時以降の更新分を取得 |
pageSize | Optional<Long> | :heavy_minus_sign: | ページサイズ |
page | Optional<Long> | :heavy_minus_sign: | ページ番号 |
GetRemovedNewsResponse
| エラー種別 | ステータスコード | コンテンツタイプ |
|---|
| models/errors/APIException | 4XX, 5XX | / |