Open femtotrader opened 7 years ago
maybe dispatch quandl
as a symbol?
search(:quandl, "GDP USA", results=30)
Or probably more elegant to just use quandl(s::String)
for get and quandl(s::String, n::Int)
for search?
I think it's better for future usage to use quandl
as a struct and not a symbol because you could store API key inside (for credentials).
You could also store in this struct session (for caching queries)...
An other point is that it will also provide a similar interface then https://github.com/femtotrader/DataReaders.jl
A last point is that method with same name and same signature than
search(::Symbol, ::AbstractString, ::Int)
is more probable than
search(::Quandl, ::AbstractString, ::Int)
Here is the quandlget
dispatch:
function quandlget(id::AbstractString; order="des", rows=100, frequency="daily", transformation="none", from="", to="", format="TimeArray", api_key="", silent=false)
If we change kwargs to parameters (i.e., get rid of the ;
) then we have a unique dispatch for get
. Is that cheating?
Hello,
I wonder if functions like
quandlget
orquandlsearch
shouldn't be simply namedget
andsearch
with an other parameter (source) being used for multiple dispatchand
Kind regards