static void GetAllRiskFactors() { string appId = ConfigurationManager.AppSettings["App-Id"]; string appKey = ConfigurationManager.AppSettings["App-Key"]; Infermedica infermedica = new Infermedica(new InfermedicaDataCache(new InfermedicaDataProvider(appId, appKey), @"..\..\Cache")); List <InfermedicaRiskFactor> riskFactors = infermedica.GetRiskFactors(); Console.WriteLine("Risk factors count: {0}", riskFactors.Count); InfermedicaExport.ToCsvFile(@"riskFactors.csv", riskFactors); }
public async Task <List <RiskFactor> > GetRiskFactors() { Infermedica med = new Infermedica(); string result = await med.GetRiskFactors(); var riskFactors = JsonConvert.DeserializeObject <List <RiskFactor> >(result) ?? new List <RiskFactor>(); return(riskFactors); }