https://github.com/ranjancse26/covidcsharp
A .NET Standard client for the COVID-19 API
https://github.com/ranjancse26/covidcsharp
covid-19 covidapi csharp
Last synced: 3 months ago
JSON representation
A .NET Standard client for the COVID-19 API
- Host: GitHub
- URL: https://github.com/ranjancse26/covidcsharp
- Owner: ranjancse26
- License: apache-2.0
- Created: 2020-04-26T08:18:04.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T21:19:33.000Z (11 months ago)
- Last Synced: 2025-01-10T16:24:15.824Z (4 months ago)
- Topics: covid-19, covidapi, csharp
- Language: C#
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CovidCSharp
A .NET Standard client for the COVID-19 API## Installation
Installation is available in [NuGet](https://www.nuget.org/packages/CovidCSharp.NET)## Usage
### Starting the client
```c#
// Note - Case status can be - confirmed, recovered, deaths
CaseService caseService = new CaseService();
IEnumerable cases = caseService.GetDayOneCasesByCountry("india");// day one cases by country with status
cases = caseService.GetDayOneCasesByCountry(country, "deaths");// day one total confirmed cases by country
cases = caseService.GetDayOneTotalConfirmedCasesByCountry(country);// day one live cases by country
cases = caseService.GetDayOneLiveCasesByCountry(country);// day one total all status cases by country
cases = caseService.GetDayOneTotalAllStatusCasesByCountry(country);// Day one live cases by country
cases = caseService.GetDayOneLiveCasesByCountry(country);// Day one total cases all status
cases = caseService.GetDayOneTotalAllStatusCasesByCountry(country);// total confirmed cases by country
cases = caseService.GetDayOneTotalConfirmedCasesByCountry(country);// live confirmed cases by country
cases = caseService.GetLiveConfirmedCasesByCountry(country,
DateTime.Parse("2020-04-20"),
DateTime.Parse("2020-04-21"));// total cases all status by country
cases = caseService.GetTotalCasesAllStatusByCountry(country);// total live cases after date
cases = caseService.GetLiveByCountryAndStatusAfterDate(country,
DateTime.Parse("2020-04-20"));// live by country
cases = caseService.GetLiveByCountryAndAllStatus(country);// world total wip cases
var worldWIPCases = caseService.GetWorldTotalWIPCases();
```### Get the list of countries
```c#
CountryService countryService = new CountryService();
var countries = countryService.GetCountries();
```### Get COVID Stats
```c#
StatisticsService statisticsService = new StatisticsService();
var stats = statisticsService.GetStatistics();
```### Get COVID Summary
```c#
SummaryService summaryService = new SummaryService();
var summary = summaryService.GetGlobalSummary();
```