function DataReader(s_source::ASCIIString; retry_count=3, pause=0.1, timeout=30)
s_source = lowercase(s_source)
if s_source in ["google", "google-daily"] then
DataReaderGoogleDaily(retry_count, pause, timeout)
elseif s_source == "google-quotes" then
DataReaderGoogleQuotes(retry_count, pause, timeout)
elseif s_source in ["yahoo", "yahoo-daily"] then
DataReaderYahooDaily(retry_count, pause, timeout)
else
error("'$s_source' is not an allowed data source")
end
end
is quite uggly...
a function to register (in an OrderedDict) might be better.
DataSource function will simply be a lookup table
Moreover it will be possible to give a list of available data sources
is quite uggly...
a function to register (in an OrderedDict) might be better.
DataSource function will simply be a lookup table
Moreover it will be possible to give a list of available data sources