Custom parsers and client functionality #33
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributing guides recommend PR against dev, I am not sure though... Can reopen it vs master.
Despite the size, this PR consists of a relatively small number of features. I am pushing them all since I use them in practice and it would be inconvenient for me to not use them.
Features:
client
as an argument and also there is a global client that is used by default. This approach lets the user define credentials not only through the ENV variable, but also read them from the file or by any other means, which can be convenient. Also, the usage ofentry
field makes it possible to use Alpha Vantage from behind the proxy.parser
as an argument. It can be eitherAbstractString
in this case parser is chosen from the predefined set, or it can be a function or any function like object. This makes possible to use construction likeparser = x -> JSON3.read(x.body)
andjson
datatype is parsed byJSON3
instead ofJSON
. Or, user can apply any parser to process the resulting data, so data can be transformed toDataFrame
,StructArray
, or any other structure, that the user wants. It is possible to collect some variety of these parsers and add them to the predefined set, thus simplifying function calls.