示例#1
0
        public async Task GetAllHospitalRawData()
        {
            var allCountiesRawData = new Dictionary <string, string>();

            foreach (var county in CountyList.Where(county => !allCountiesRawData.ContainsKey(county.CountyName)))
            {
                string countyRawData = await CovidDataService.GetCARawCovidHospitalJsonDataByCounty(county.CountyName);

                allCountiesRawData.Add(county.CountyName, countyRawData);
            }

            await DownloadZip(allCountiesRawData, "Hospital_Data", "CAOpenData_Hospital_All_Counties");
        }
示例#2
0
        public async Task GetHospitalRawDataPerCounty()
        {
            string rawData = await CovidDataService.GetCARawCovidHospitalJsonDataByCounty(SelectedCounty?.CountyName);

            await DownloadJsonFile(rawData, $"{SelectedCounty?.CountyName}_CAOpenData_Hospital_{DateTime.Now:yyyy-MM-dd}.json");
        }