public StatisticsCollector(QuandlApiOptions options) { _options = options; _totalDataPoints = 0; _statsLock = new object(); Statistics = new ApiStatistics(); }
public RequestRouter(QuandlApiOptions options, IStatisticsCollector statisticsCollector) { _options = options; _statisticsCollector = statisticsCollector; _client = new HttpClient() { BaseAddress = new Uri(Endpoints.QuandlApiBase) }; }
public async Task <string> Get(Metal metal) { string url; string json; var quandlApiOptions = new QuandlApiOptions(); _configuration .GetSection(QuandlApiOptions.QuandlApi) .Bind(quandlApiOptions); if (metal == Metal.Gold) { url = quandlApiOptions.GoldPricesUrl; } else { url = quandlApiOptions.SilverPricesUrl; } json = await GetPrices(url); return(json); }