Ejemplo n.º 1
0
        private void InitializeObjects()
        {
            apiCaller = new CallingApi(Const.API_KEY);

            PhysicalCurrencies = CodesHelper.ReadCurrencies(Const.PATH_TO_PHYSICAL, CurrencyType.Physical).ToList();
            DigitalCurrencies  = CodesHelper.ReadCurrencies(Const.PATH_TO_DIGITAL, CurrencyType.Digital).ToList();
            Currencies         = PhysicalCurrencies.Concat(DigitalCurrencies).ToList();

            DataContext = this;

            ExchangeModel = new CurrencyExchangeModel();
            ExchangeModel.PropertyChanged += ExchangeModel_PropertyChanged;

            DailyModel = new CurrencyDailyModel();
            DailyModel.PropertyChanged += DailyModel_PropertyChanged;

            parser = new JsonParser();
            CryptoDailyDisplays = new ObservableCollection <CryptoCurrencyDaily>();
        }
Ejemplo n.º 2
0
        public async Task <string> GetCurrencyDaily(CurrencyDailyModel model)
        {
            var formedUrl = string.Format(this.CURRENCY_DAILY_URL, model.Symbol.Code, model.Market.Code, this.apiKey);

            return(await this.GetCurrency(formedUrl));
        }