Skip to content

Commit

Permalink
Release 1.6.0 (#18)
Browse files Browse the repository at this point in the history
* add support for fundamental data
  • Loading branch information
crazzyghost authored Nov 14, 2021
1 parent 75f64f2 commit 8fa3e5d
Show file tree
Hide file tree
Showing 57 changed files with 4,052 additions and 37 deletions.
16 changes: 1 addition & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,4 @@ jobs:
workflows:
workflow:
jobs:
- build

# version: 2.1
# orbs:
# node: circleci/[email protected]

# executor:
# name: node/default
# tag: '10.16'
# steps:
# - checkout
# - node/with-cache:
# steps:
# - run: npm install
# - run: npm run test-ci
- build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,5 @@ bin/**
*.sh

_config.yml
site/**
site/**
.python-version
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.6.0] - 14-11-2021
### Added
- Support for fundamental data


## [v1.5.0] - 11-01-2021
### Added
- Support for synchronous requests
Expand Down Expand Up @@ -84,6 +89,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Tests for Time Series
- README

[v1.6.0]: https://github.com/crazzyghost/alphavantage-java/compare/1.5.0...1.6.0
[v1.5.0]: https://github.com/crazzyghost/alphavantage-java/compare/1.4.2...1.5.0
[v1.4.2]: https://github.com/crazzyghost/alphavantage-java/compare/1.4.1...1.4.2
[v1.4.1]: https://github.com/crazzyghost/alphavantage-java/compare/1.4.0...1.4.1
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Here, we choose which data category/endpoint we want to access
| Digital Currency Data | `.crypto()` |
| Technical Indicator Data | `.indicator()` |
| Sector Performance Data | `.sector()` |
| Fundamental Data | `.fundamentalData()` |

For example, to select the Stock Time Series:

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id 'java'
id 'java-library'
id 'maven'
id 'maven-publish'
id 'jacoco'
}

group = 'com.github.crazzyghost'

version '1.5.0'
version '1.6.0'

sourceCompatibility = 1.8

Expand Down
4 changes: 4 additions & 0 deletions docs/api/alphavantage/alphavantage.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Alphavantage.api().init(config)
| [forex](#) | Access to Foreign Exchange Data. `public Forex forex()` |
| [indicator](#) | Access to Technical Indicators. Returns an Indicator instance for access to Technical Indicator Data `public Indicator indicator()` |
| [timeSeries](#) | Access to Stock Time Series Data.`public TimeSeries timeSeries()` |
| [sector](#) | Access to Sector Performance Data.`public Sector sector()` |
| [fundamentaldata](#) | Access to Fundamental Data.`public FundamentalData fundamentalData()` |

[api]: (#)
[init]: (#)
Expand All @@ -47,3 +49,5 @@ Alphavantage.api().init(config)
[forex]: (#)
[indicator]: (#)
[timeseries]: (#)
[sector]: (#)
[fundamentaldata]: (#)
2 changes: 2 additions & 0 deletions docs/api/alphavantage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
|[indicator]|`package alphavantage.indicator`|
|[exchangerate]|`package alphavantage.exchangerate`|
|[sector]|`package alphavantage.sector`|
|[fundamentaldata]|`package alphavantage.fundamentaldata`|

[TimeSeries]: index.md

Expand All @@ -38,3 +39,4 @@
[forex]: ../forex/index.md
[exchangerate]: ../exchangerate/index.md
[sector]: ../sector/index.md
[fundamentaldata]: ../fundamentaldata/index.md
32 changes: 32 additions & 0 deletions docs/api/fundamentaldata/fundamentaldata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[alphavantage](../alphavantage/index.md) / [fundamentaldata](./index.md) / [FundamentalData](#)

# Sector

`public final class FundamentalData extends Object implements `[`Fetcher`](../alphavantage/fetcher.md)

Access to Fundamental Data

### Constructors

|Name|Summary|
|----|-------|
| [FundamentalData](./fundamentaldata.md) | `public FundamentalData(Config config)` |


### Properties

|Name|Summary|
|----|-------|
| [config](#) | `private Config config` |
| [builder](#) | `private FundamentaDataRequest.Builder builder` |
| [successCallback](#) | `private Fetcher.SuccessCallback<?> successCallback` |
| [failureCallback](#) | `private Fetcher.FailureCallback failureCallback` |

### Methods

|Name|Summary|
|----|-------|
| [onSuccess](#) | `public FundamentalData onSuccess(Fetcher.SuccessCallback<?> callback)` |
| [onFailure](#) | `public FundamentalData onFailure(Fetcher.FailureCallback callback)` |
| [fetch](#) | `public void fetch()` |
| [fetchSync](#) | `public void fetchSync()` |
22 changes: 22 additions & 0 deletions docs/api/fundamentaldata/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# alphavantage-java

[alphavantage](../alphavantage/index.md) / [fundamentaldata](#)

## Package alphavantage.fundamentaldata

### Types

|Name|Summary|
|----|-------|
|[FundamentalData]| Access to Fundamental Data. `class FundamentalData`|

### Packages

|Name|Summary|
|----|-------|
|[request]|`package alphavantage.fundamentaldata.request`|
|[response]|`package alphavantage.fundamentaldata.response`|

[FundamentalData]: fundamentaldata.md
[request]: request.md
[response]: response.md
26 changes: 26 additions & 0 deletions docs/api/fundamentaldata/request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# alphavantage-java

[alphavantage] / [fundamentaldata] / [request]

## Package alphavantage.fundamentaldata.request

### Types

|Name|Summary|
|----|-------|
|[BalanceSheetRequest]| `public class BalanceSheetRequest`|
|[CashFlowRequest]| `public class CashFlowRequest`|
|[CompanyOverviewRequest]| `public class CompanyOverviewRequest`|
|[EarningsRequest]| `public class EarningsResponseRequest`|
|[FundamentalDataRequest]| `public abstract class FundamentalDataRequest`|
|[IncomeStatementRequest]| `public class IncomeStatementRequest`|

[alphavantage]: ../alphavantage/index.md
[fundamentaldata]: ./index.md
[request]: ./request.md
[BalanceSheetRequest]: ./request.md
[CashFlowRequest]: ./request.md
[CompanyOverviewRequest]: ./request.md
[EarningsRequest]: ./request.md
[FundamentalDataRequest]: ./request.md
[IncomeStatementRequest]: ./request.md
36 changes: 36 additions & 0 deletions docs/api/fundamentaldata/response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# alphavantage-java

[alphavantage] / [fundamentaldata] / [response]

## Package alphavantage.fundamentaldata.response

### Types

|Name|Summary|
|----|-------|
|[AnnualEarning]| `class AnnualEarning`|
|[BalanceSheet]| `class BalanceSheet`|
|[BalanceSheetResponse]| `class BalanceSheetResponse`|
|[CashFlow]| `class CashFlow`|
|[CashFlowResponse]| `class CashFlowResponse`|
|[CompanyOverview]| `class CompanyOverview`|
|[CompanyOverviewResponse]| `class CompanyOverviewResponse`|
|[EarningsResponse]| `class EarningsResponse`|
|[IncomeStatement]| `class IncomeStatement`|
|[IncomeStatementResponse]| `class IncomeStatementResponse`|
|[QuarterlyEarning]| `class QuarterlyEarning`|

[alphavantage]: ../alphavantage/index.md
[fundamentaldata]: ./index.md
[response]: ./response.md
[AnnualEarning]: ./response.md
[BalanceSheet]: ./response.md
[BalanceSheetResponse]: ./response.md
[CashFlow]: ./response.md
[CashFlowResponse]: ./response.md
[CompanyOverview]: ./response.md
[CompanyOverviewResponse]: ./response.md
[IncomeStatement]: ./response.md
[IncomeStatementResponse]: ./response.md
[QuarterlyEarning]: ./response.md
[EarningsResponse]: ./response.md
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v1.6.0 - 14-11-2021

- New: Support for fundamental data

## v1.5.0 - 11-01-2021

- New: Support for synchronous requests
Expand Down
76 changes: 76 additions & 0 deletions docs/fundamentaldata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
## Fundamental Data

### Cash Flow

=== "Java"
:::java
AlphaVantage
.api()
.fundamentalData()
.cashFlow()
.forSymbol("IBM")
.onSuccess((CashFlowResponse e) -> process(e))
.fetch();

**Response Type:**
`CashFlowResponse`

### Income Statement

=== "Java"
:::java
AlphaVantage
.api()
.fundamentalData()
.incomeStatement()
.forSymbol("IBM")
.onSuccess((IncomeStatementResponse e) -> process(e))
.fetch();

**Response Type:**
`IncomeStatementResponse`

### Balance Sheet

=== "Java"
:::java
AlphaVantage
.api()
.fundamentalData()
.balanceSheet()
.forSymbol("IBM")
.onSuccess((BalanceSheetResponse e) -> process(e))
.fetch();

**Response Type:**
`BalanceSheetResponse`

### Earnings

=== "Java"
:::java
AlphaVantage
.api()
.fundamentalData()
.earnings()
.forSymbol("IBM")
.onSuccess((EarningsResponse e) -> process(e))
.fetch();

**Response Type:**
`EarningsResponse`

### Company Overview

=== "Java"
:::java
AlphaVantage
.api()
.fundamentalData()
.companyOverview()
.forSymbol("IBM")
.onSuccess((CompanyOverviewResponse e) -> process(e))
.fetch();

**Response Type:**
`CompanyOverviewResponse`
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Here, we choose which data category/endpoint we want to access
| Digital Currency Data | `.crypto()` |
| Technical Indicator Data | `.indicator()` |
| Sector Performance Data | `.sector()` |
| Fundamental Data | `.fundamentalData()` |

For example, to select the Stock Time Series:

Expand Down Expand Up @@ -218,7 +219,7 @@ When you are okay with setting the parameters call the `fetch()` method. Simple!
.onFailure({ e-> hanldeFailure(e) })
.fetch()

You can also use the synchronous fetch method by calling the `fetchSync()` method without callback handlers.
From v1.5.0 up, you can also use the synchronous fetch method by calling the `fetchSync()` method without callback handlers.

=== "Java"
:::java
Expand Down
11 changes: 8 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ copyright: 'Copyright &copy; 2019 S. M. Sefa-Yeboah'

nav:
- Overview: index.md
- "v1.5.0 API":
- "v1.6.0 API":
- alphavantage: api/alphavantage/index.md
- crypto: api/crypto/index.md
- exchangerate: api/exchangerate/index.md
- forex: api/forex/index.md
- indicator: api/indicator/index.md
- timeseries: api/timeseries/index.md
- sector: api/sector/index.md
- Recipes:
- fundamentaldata: api/fundamentaldata/index.md
- Recipes:
- Stock Time Series: timeseries.md
- Forex (FX): forex.md
- CryptoCurrencies: crypto.md
- Exchange Rates: exchangerate.md
- Technical Indicators: indicators.md
- Sector Performances: sector.md
- Fundamental Data: fundamentaldata.md
- Changelog: changelog.md
theme:
name: material
Expand All @@ -40,8 +42,11 @@ extra_css:
markdown_extensions:
- admonition
- codehilite:
guess_lang: false
guess_lang: true
- toc:
permalink: true
- pymdownx.tabbed
# - pymdownx.highlight:
# guess_lang: true
- pymdownx.superfences

11 changes: 11 additions & 0 deletions src/main/java/com/crazzyghost/alphavantage/AlphaVantage.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.crazzyghost.alphavantage.cryptocurrency.Crypto;
import com.crazzyghost.alphavantage.exchangerate.ExchangeRate;
import com.crazzyghost.alphavantage.forex.Forex;
import com.crazzyghost.alphavantage.fundamentaldata.FundamentalData;
import com.crazzyghost.alphavantage.indicator.Indicator;
import com.crazzyghost.alphavantage.sector.Sector;
import com.crazzyghost.alphavantage.timeseries.TimeSeries;
Expand Down Expand Up @@ -116,4 +117,14 @@ public Indicator indicator(){
public Sector sector(){
return new Sector(config);
}

/**
* Access to Fundamental Data.
*
* @return A {@link FundamentalData} instance for access to Sector Performance Data
*/
public FundamentalData fundamentalData(){
return new FundamentalData(config);
}

}
Loading

0 comments on commit 8fa3e5d

Please sign in to comment.