patriques82 / alphavantage4j

(Repository is not maintained anymore) A Java wrapper to get stock data and stock indicators from the Alpha Vantage API
https://www.alphavantage.co/
Apache License 2.0
124 stars 73 forks source link

Naming of TimeSeries missleading #36

Closed team172011 closed 5 years ago

team172011 commented 5 years ago

I think that the naming of the TimeSeries class is missleading, because it is not a series that stores data, but a kind of AlphaVantageConnectionManager. The Daily, IntraDay, Monthly, ..., should be called a TimeSeries (maybe with a TimeLevel flag) because they store the corresponding data. This change would also remove a lot of potential errors by calling the wrong TimeSeries#intraDay ,TimeSeries#daily, TimeSeries#weekly function.

I would suggest to rename TimeSeries to something like AlphaVantageConnectionManager and for example let the intraDay method return a TimeSeries object with stock data and a flag (maybe an enum) that describes the time period

patriques82 commented 5 years ago

I don't think this is necessary. The intention of the class structure is to follow the Alpha Vantage standards used by their rest api and also their documentation. I think a renaming like this will make users more confused over not being able to follow the documented structure of the Alpha Vantage api.