{"id":15036137,"url":"https://github.com/abdirahiim/covidtrackerapiwrapper","last_synced_at":"2026-03-05T12:03:32.248Z","repository":{"id":38097523,"uuid":"248637273","full_name":"Abdirahiim/covidtrackerapiwrapper","owner":"Abdirahiim","description":"CovidSharp is a crossplatform C#  API wrapper for the Coronavirus tracking API (https://github.com/ExpDev07/coronavirus-tracker-api)","archived":false,"fork":false,"pushed_at":"2022-12-08T10:05:49.000Z","size":10531,"stargazers_count":11,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T01:13:07.636Z","etag":null,"topics":["api-wrapper","coronavirus","coronavirus-info","coronavirus-tracker","coronavirus-tracking","covid-19","covid19","csharp","csharp-code","csharp-library","dotnet","dotnet-standard","nuget"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abdirahiim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-20T00:58:33.000Z","updated_at":"2022-01-27T22:04:15.000Z","dependencies_parsed_at":"2023-01-25T01:00:16.466Z","dependency_job_id":null,"html_url":"https://github.com/Abdirahiim/covidtrackerapiwrapper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdirahiim%2Fcovidtrackerapiwrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdirahiim%2Fcovidtrackerapiwrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdirahiim%2Fcovidtrackerapiwrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdirahiim%2Fcovidtrackerapiwrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abdirahiim","download_url":"https://codeload.github.com/Abdirahiim/covidtrackerapiwrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248127104,"owners_count":21052179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","coronavirus","coronavirus-info","coronavirus-tracker","coronavirus-tracking","covid-19","covid19","csharp","csharp-code","csharp-library","dotnet","dotnet-standard","nuget"],"created_at":"2024-09-24T20:30:16.481Z","updated_at":"2026-03-05T12:03:32.217Z","avatar_url":"https://github.com/Abdirahiim.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CovidSharp\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n[![Build status](https://ci.appveyor.com/api/projects/status/g4v7ilorkumnr0e3?svg=true)](https://ci.appveyor.com/project/Abdirahiim/covidsharp)\n[![NuGet](https://img.shields.io/nuget/v/CovidSharp.svg?label=NuGet)](https://www.nuget.org/packages/CovidSharp/)\n![NuGet](https://img.shields.io/nuget/dt/CovidSharp.svg)\n[![GitHub stars](https://img.shields.io/github/stars/Abdirahiim/covidtrackerapiwrapper)](https://github.com/Abdirahiim/covidtrackerapiwrapper/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/Abdirahiim/covidtrackerapiwrapper)](https://github.com/Abdirahiim/covidtrackerapiwrapper/network/members)\n[![HitCount](http://hits.dwyl.com/Abdirahiim/covidtrackerapiwrapper.svg)](http://hits.dwyl.com/Abdirahiim/covidtrackerapiwrapper)\n\nCovidSharp is a crossplatform C# API wrapper for the [Coronavirus tracking API](https://github.com/ExpDev07/coronavirus-tracker-api)\n\n\n\n## Installation\nYou can install it as a [nuget package](https://www.nuget.org/packages/CovidSharp) \n\n## Usage\n\n### Call the Library\n```c#\nusing CovidSharp;\n```\n- Declares the instance of the library\n```c#\nCoronavirusData data = new CoronavirusData();\n```\n\n### Get the Latest Data\n\n- Fetches the latest worldwide data\n```c#\n Console.WriteLine(\"Confirmed: \" + data.LatestConfirmed());\n Console.WriteLine(\"Recovered: \" + data.LatestRecovered());\n Console.WriteLine(\"Deaths: \" + data.LatestDeaths());\n```\n\n### Get Data by country code\n\n- Use a country code and fetch the data of that country\n```c#\n Console.WriteLine(\"Denmark Confirmed: \" + data.FromCountryConfirmed(\"DK\"));\n Console.WriteLine(\"Denmark Recovered: \" + data.FromCountryRecovered(\"DK\"));\n Console.WriteLine(\"Denmark Deaths: \" + data.FromCountryDeaths(\"DK\"));\n Console.WriteLine(\"Denmark Population: \" + data.FromCountryCodePopulation(\"DK\"));\n```\n### Get Data by country name\n\n- Use a country code and fetch the data of that country\n```c#\n   Console.WriteLine(\"China Confirmed: \" + data.FromCountryNameConfirmed(\"China\"));\n   Console.WriteLine(\"China Recovered: \" + data.FromCountryNameRecovered(\"China\"));\n   Console.WriteLine(\"China population: \" + data.FromCountryNamePopulation(\"China\"));\n```\n\n### Get Data by ID\n\nYou can use the associated ID of a province or country to get the desired information\nYou can find countries IDs [here](http://coronavirus-tracker-api.herokuapp.com/v2/locations)\n\n- This code gets the latest data of Denmark using ID instead of a country code\n```c#\n Console.WriteLine(\"Denmark ID Confirmed: \" + data.FromIDConfirmed(\"94\"));\n Console.WriteLine(\"Denmark  ID Recovered: \" + data.FromCountryRecovered(\"94\"));\n Console.WriteLine(\"Denmark ID Deaths: \" + data.FromCountryDeaths(\"94\"));\n```\n\n- Get the province name associated with an ID, in this case the ID of 92 is associated with the Faroe Islands province\n```c#\n  Console.WriteLine(\"Name of the Faroe Islands: \" + data.FromIDProvince(\"92\"));\n```\n\n- Get the country name associated with an ID, in this case the ID of 92 is associated with the Faroe Islands province\n```c#\n  Console.WriteLine(\"Name of the country of the Faroe Islands: \" + data.FromIDCountry(\"92\"));\n```\n\n- Get the latitude associated with an ID\n```c#\n  Console.WriteLine(\"Denmark Latitude: \" + data.FromIDLatitude(\"94\"));\n```\n\n- Get the longitude associated with an ID\n```c#\n  Console.WriteLine(\"Denmark Longtitude: \" + data.FromIDLongitude(\"94\"));\n```\n\n- Get the country population associated with an ID\n```c#\n   Console.WriteLine(\"Denmark Population: \" + data.FromIDPopulation(\"94\"));\n```\n\n### Get a list of data\n\nYou can easily fetch a list of your desired data, the default source is always jhs\n\n- Get a list of the all the countries in the world\n```c#\n  Console.WriteLine(data.GetCountryList());\n```\n\n- Get a list of the populations of all the countries in the world\n```c#\n  Console.WriteLine(data.GetPopulationList());\n```\n\n- Get a list of the provinces of all the countries in the world\n```c#\n  Console.WriteLine(data.GetProvinceList());\n```\n\n- Get a list of the counties in the US using CSBS as a source\n```c#\n  Console.WriteLine(data.GetCountyList(\"csbs\"));\n```\n\n\n\n\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Abdirahiim\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/13730460?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAbdirahiim Yassin \u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Abdirahiim/covidtrackerapiwrapper/commits?author=Abdirahiim\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/Abdirahiim/covidtrackerapiwrapper/commits?author=Abdirahiim\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#example-Abdirahiim\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#maintenance-Abdirahiim\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/Abdirahiim/covidtrackerapiwrapper/commits?author=Abdirahiim\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/haseeb-heaven\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/11544739?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHaseeB Mir\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Abdirahiim/covidtrackerapiwrapper/commits?author=haseeb-heaven\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#example-haseeb-heaven\" title=\"Examples\"\u003e💡\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Raamyy\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/29176293?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRamy Gamal\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Abdirahiim/covidtrackerapiwrapper/commits?author=Raamyy\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://jacobtonder.dk\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/13803549?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJacob Tønder\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-jacobtonder\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Aleksey-Nikonov\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/11257605?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAleksey-Nikonov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-Aleksey-Nikonov\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdirahiim%2Fcovidtrackerapiwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdirahiim%2Fcovidtrackerapiwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdirahiim%2Fcovidtrackerapiwrapper/lists"}