Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
Update version and encapsulate class fields in IEXCloudClient
Browse files Browse the repository at this point in the history
The pom.xml version was updated from 1.13.0-SNAPSHOT to 2.0.0-SNAPSHOT. This signifies substantial changes or upgrades in the application.

In the IEXCloudClient.java, class field variables (reference, companyData, historicalData) were changed from public to private to adhere to good Object-Oriented Programming practices. Public accessors (fetchReferenceData, fetchCompanyData, fetchHistoricalData) were also added for each field to safely retrieve their values.
  • Loading branch information
F4pl0 committed Nov 26, 2023
1 parent f6a7081 commit d7305e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.f4pl0</groupId>
<artifactId>iex-cloud</artifactId>
<version>1.13.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>IEX Cloud</name>
<description>Java wrapper for IEX Cloud API</description>
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/io/github/f4pl0/IEXCloudClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
public class IEXCloudClient {
public final EquitiesMarketData equitiesMarketData;
public final Reference reference;
public final CompanyData companyData;
public final HistoricalData historicalData;
private final Reference reference;
private final CompanyData companyData;
private final HistoricalData historicalData;

/**
* Create a new IEXCloudClient.
Expand All @@ -29,6 +29,18 @@ private IEXCloudClient(IEXCloudConfig config) {
historicalData = new HistoricalData();
}

public Reference fetchReferenceData() {
return this.reference;
}

public CompanyData fetchCompanyData() {
return this.companyData;
}

public HistoricalData fetchHistoricalData() {
return this.historicalData;
}

/**
* Builder for the IEXCloudClient.
* You will need to set the publishable token before building the client.
Expand Down

0 comments on commit d7305e5

Please sign in to comment.