BZ-Java-Client
์์ฝ
๋ชฉ์ฐจ
- BZ-Java-Client
- SDK ์ค์น
- SDK ์ฌ์ฉ ์์
- ์ธ์ฆ
- ์ฌ์ฉ ๊ฐ๋ฅํ ๋ฆฌ์์ค ๋ฐ ์์
- ์ฌ์๋
- ์ค๋ฅ ์ฒ๋ฆฌ
- ์๋ฒ ์ ํ
- ๊ฐ๋ฐ
- ์ฑ์๋
- ๊ธฐ์ฌ
SDK ์ค์น
์์ํ๊ธฐ
๋น๋ ๋ฐฉ๋ฒ
./gradlew build๋ฅผ, Windows ์์คํ
์์๋ gradlew.bat๋ฅผ ์คํํ์ฌ ์์ค์์ SDK ์ํฐํฉํธ๋ฅผ build ๋๋ ํฐ๋ฆฌ๋ก ๋น๋ํ ์ ์์ต๋๋ค.
์์ค์์ ๋น๋ํ๊ณ SDK ์ํฐํฉํธ๋ฅผ ๋ก์ปฌ Maven ์ ์ฅ์(๋ก์ปฌ ํ์ผ ์์คํ
)์ ๊ฒ์ํ๋ ค๋ฉด, git ์ ์ฅ์๋ฅผ ๋ก์ปฌ์ ํด๋ก ํ ๋ค ๋ค์ ๋ช
๋ น์ ์ฌ์ฉํ์ญ์์ค:
*nix์์:
SDK ์ฌ์ฉ ์์
์์
์ธ์ฆ
ํด๋ผ์ด์ธํธ๋ณ ๋ณด์ ์คํค๋ง
| Name | Type | Scheme |
|---|---|---|
apiKeyAuth | apiKey | API key |
apiKeyAuth ํ๋ผ๋ฏธํฐ๋ฅผ ์ค์ ํด์ผ ํฉ๋๋ค. ์์๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
์ฌ์ฉ ๊ฐ๋ฅํ ๋ฆฌ์์ค ๋ฐ ์์
- ๊ฐ์ ธ์ค๊ธฐ - ์ ๋๋ฆฌ์คํธ ์ธ์ฌ์ดํธ V1 ์กฐํ
- get - ์ ๋๋ฆฌ์คํธ ๋ฆฌํฌํธ ์๋ฌธ ํ ์คํธ ๋ฐ์ดํฐ ์กฐํ
- get - Bars V2 ๊ฐ์ ธ์ค๊ธฐ
- get - Bulls Say Bears Say V1 ๊ฐ์ ธ์ค๊ธฐ
- ๊ฐ์ ธ์ค๊ธฐ - ์ปจํผ๋ฐ์ค ์ฝ ๊ฐ์ ธ์ค๊ธฐ
- get - ์ปจ์ผ์์ค ๋ฑ๊ธ ๊ฐ์ ธ์ค๊ธฐ
- get - ํ์ ์งํ ๋ฐ ๋น์จ v3 ๊ฐ์ ธ์ค๊ธฐ
- ๊ฐ์ ธ์ค๊ธฐ - earning ratios v2.1 ๊ฐ์ ธ์ค๊ธฐ
- get - ์ค์ ์กฐํ
- get - ์ค์ ๋ฐํ ์ฝ ์ ๋ฌธ ๊ฐ์ ธ์ค๊ธฐ
- getAudio - ์ค์ ๋ฐํ ์ฝ ์ค๋์ค ํ์ผ ๊ฐ์ ธ์ค๊ธฐ
- get - ๊ฒฝ์ ์งํ ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ
- get - ์ด๋ฒคํธ ๊ฐ์ ธ์ค๊ธฐ
- get - FDA ์กฐํ
- getV21 - ๊ธฐ์ด ์ฌ๋ฌด ์งํ V2.1 ๊ฐ์ ธ์ค๊ธฐ
- getAlphaBeta - ์ํ/๋ฒ ํ V2.1 ๊ฐ์ ธ์ค๊ธฐ
- getCompanyV21 - ๊ธฐ์ ๋ฐ์ดํฐ v2.1 ๊ฐ์ ธ์ค๊ธฐ
- getCompanyProfileV21 - ๊ธฐ์ ํ๋กํ v2.1 ๊ฐ์ ธ์ค๊ธฐ
- getShareClass - ์ฃผ์ ํด๋์ค V2.1 ๊ฐ์ ธ์ค๊ธฐ
- getShareClassProfile - ์ฃผ์ ํด๋์ค ํ๋กํ V2.1 ๊ฐ์ ธ์ค๊ธฐ
- get - ๊ธฐ์ด ์ฌ๋ฌด ์งํ V2 ๊ฐ์ ธ์ค๊ธฐ
- getAssetClassification - ์์ฐ ๋ถ๋ฅ V2.1 ๊ฐ์ ธ์ค๊ธฐ
- getEarningsReports - ์ค์ ๋ณด๊ณ ์ V2.1 ๊ฐ์ ธ์ค๊ธฐ
- getFinancialsV21 - ์ฌ๋ฌด์ ํ V2.1 ๊ฐ์ ธ์ค๊ธฐ
- getV3 - ๊ธฐ์ด ์ฌ๋ฌด ์งํ V3 ๊ฐ์ ธ์ค๊ธฐ
- getBalanceSheetV3 - ๋์ฐจ๋์กฐํ V3 ๊ฐ์ ธ์ค๊ธฐ
- getCashFlowV3 - ํ๊ธํ๋ฆํ V3 ๊ฐ์ ธ์ค๊ธฐ
- getIncomeStatement - ์์ต๊ณ์ฐ์ V3 ๊ฐ์ ธ์ค๊ธฐ
- getSharePriceRatios - ์ฃผ๊ฐ ๋น์จ V3 ๊ฐ์ ธ์ค๊ธฐ
- ๊ฐ์ ธ์ค๊ธฐ - ์ ๋ถ ๊ฑฐ๋ ๋ณด๊ณ ์ ๊ฐ์ ธ์ค๊ธฐ
- get - ์ ๋ถ ๊ฑฐ๋ ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ
- get - ๊ฐ์ด๋์ค ๊ฐ์ ธ์ค๊ธฐ
- ๊ฐ์ ธ์ค๊ธฐ - Insider Transaction ๊ฐ์ ธ์ค๊ธฐ
- getOwner - ์ธ์ฌ์ด๋ ๊ฑฐ๋ ์์ ์ ๊ฐ์ ธ์ค๊ธฐ
- get - ์ธ์ ๋ฐ ํฉ๋ณ ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ
- get - ๋ด์ค ๊ฐ์ ธ์ค๊ธฐ
- getRemoved - ์ญ์ ๋ ๋ด์ค ๊ฐ์ ธ์ค๊ธฐ
- get - Newsquantified ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ
- get - Offerings ๊ฐ์ ธ์ค๊ธฐ
- get - ์ด์ ๋น์จ v2.1 ๊ฐ์ ธ์ค๊ธฐ
- get - OptionActivity V1 ๊ฐ์ ธ์ค๊ธฐ
quotedelayed()
- getV1 - ์ง์ฐ๋ ์์ธ V1 ๊ฐ์ ธ์ค๊ธฐ
- get - ์ง์ฐ ์์ธ V2 ๊ฐ์ ธ์ค๊ธฐ
- get - Ratings ๊ฐ์ ธ์ค๊ธฐ
- get - Ratings Analysts ๊ฐ์ ธ์ค๊ธฐ
- get - ํ๊ฐ ๊ธฐ๊ด ๊ฐ์ ธ์ค๊ธฐ
- get - Removed ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ (v2)
- get - Splits ๊ฐ์ ธ์ค๊ธฐ
- get - ํฐ์ปค ํธ๋ ๋ ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ
- getList - ํฐ์ปค ํธ๋ ๋ ๋ชฉ๋ก ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ
- get - Valuation Ratios v2.1 ๊ฐ์ ธ์ค๊ธฐ
์ฌ์๋
retryConfig ๋น๋ ๋ฉ์๋๋ฅผ ํตํด RetryConfig ๊ฐ์ฒด๋ฅผ ์ ๊ณตํ๋ฉด ๋ฉ๋๋ค:
์ค๋ฅ ์ฒ๋ฆฌ
models/errors/APIException ์์ธ๋ฅผ ๋์ง๋๋ค. ์คํผ๋ ์ด์
์ ๋ํด ์ฌ์ฉ์ ์ ์ ์ค๋ฅ ์๋ต์ด ์ง์ ๋ ๊ฒฝ์ฐ, SDK๋ ๊ทธ์ ์ฐ๊ด๋ ์์ธ๋ฅผ ์ถ๊ฐ๋ก ๋์ง ์ ์์ต๋๋ค. ๊ฐ ์คํผ๋ ์ด์
์์ ๋ฐ์ํ ์ ์๋ ์์ธ ํ์
์ ๋ํ ์์ธํ ๋ด์ฉ์ SDK ๋ฌธ์์ ํด๋น ์ค๋ฅ ํ๋ฅผ ์ฐธ์กฐํ์ญ์์ค. ์๋ฅผ ๋ค์ด, get ๋ฉ์๋๋ ๋ค์ ์์ธ๋ฅผ ๋์ง๋๋ค:
| ์ค๋ฅ ํ์ | ์ํ ์ฝ๋ | ์ฝํ ์ธ ์ ํ |
|---|---|---|
| models/errors/ApiErrorResponse | 400, 500 | application/json |
| models/errors/APIException | 4XX, 5XX | / |
์์
์๋ฒ ์ ํ
์ธ๋ฑ์ค๋ก ์๋ฒ ์ ํ
.serverIndex(int serverIdx) ๋น๋ ๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ฌ ์ ์ญ ๊ธฐ๋ณธ ์๋ฒ๋ฅผ ์ฌ์ ์ํ ์ ์์ต๋๋ค. ์ ํํ ์๋ฒ๋ ํด๋น ์๋ฒ๋ฅผ ์ฌ์ฉํ๋ ์คํผ๋ ์ด์
์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ฌ์ฉ๋ฉ๋๋ค. ๋ค์ ํ๋ ์ฌ์ฉ ๊ฐ๋ฅํ ์๋ฒ์ ๋์ํ๋ ์ธ๋ฑ์ค๋ฅผ ๋ณด์ฌ์ค๋๋ค:
| # | Server |
|---|---|
| 0 | https://api.benzinga.com |
| 1 | https://api.benzinga.com/api/v1 |
| 2 | https://api.benzinga.com/api/v2 |
| 3 | https://api.benzinga.com/api/v2.1 |
| 4 | https://api.benzinga.com/api/v2.2 |
์์
ํด๋ผ์ด์ธํธ๋ณ ์๋ฒ URL ์ฌ์ ์
.serverURL(String serverUrl) ๋น๋ ๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ฌ ์ ์ญ์ ์ผ๋ก ์ฌ์ ์ํ ์๋ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด: