在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Abdirahiim/covidtrackerapiwrapper开源软件地址:https://github.com/Abdirahiim/covidtrackerapiwrapper开源编程语言:C# 100.0%开源软件介绍:CovidSharpCovidSharp is a crossplatform C# API wrapper for the Coronavirus tracking API InstallationYou can install it as a nuget package UsageCall the Libraryusing CovidSharp;
CoronavirusData data = new CoronavirusData(); Get the Latest Data
Console.WriteLine("Confirmed: " + data.LatestConfirmed());
Console.WriteLine("Recovered: " + data.LatestRecovered());
Console.WriteLine("Deaths: " + data.LatestDeaths()); Get Data by country code
Console.WriteLine("Denmark Confirmed: " + data.FromCountryConfirmed("DK"));
Console.WriteLine("Denmark Recovered: " + data.FromCountryRecovered("DK"));
Console.WriteLine("Denmark Deaths: " + data.FromCountryDeaths("DK"));
Console.WriteLine("Denmark Population: " + data.FromCountryCodePopulation("DK")); Get Data by country name
Console.WriteLine("China Confirmed: " + data.FromCountryNameConfirmed("China"));
Console.WriteLine("China Recovered: " + data.FromCountryNameRecovered("China"));
Console.WriteLine("China population: " + data.FromCountryNamePopulation("China")); Get Data by IDYou can use the associated ID of a province or country to get the desired information You can find countries IDs here
Console.WriteLine("Denmark ID Confirmed: " + data.FromIDConfirmed("94"));
Console.WriteLine("Denmark ID Recovered: " + data.FromCountryRecovered("94"));
Console.WriteLine("Denmark ID Deaths: " + data.FromCountryDeaths("94"));
Console.WriteLine("Name of the Faroe Islands: " + data.FromIDProvince("92"));
Console.WriteLine("Name of the country of the Faroe Islands: " + data.FromIDCountry("92"));
Console.WriteLine("Denmark Latitude: " + data.FromIDLatitude("94"));
Console.WriteLine("Denmark Longtitude: " + data.FromIDLongitude("94"));
Console.WriteLine("Denmark Population: " + data.FromIDPopulation("94")); Get a list of dataYou can easily fetch a list of your desired data, the default source is always jhs
Console.WriteLine(data.GetCountryList());
Console.WriteLine(data.GetPopulationList());
Console.WriteLine(data.GetProvinceList());
Console.WriteLine(data.GetCountyList("csbs"));
Contributors |
Abdirahiim Yassin |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论