Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/egbakou/covid19tracker.net

.NET Standard wrapper arrond the api provided by https://github.com/NovelCovid/API
https://github.com/egbakou/covid19tracker.net

covid-19 covid-api covid19-data dotnet-standard nuget-package

Last synced: 14 days ago
JSON representation

.NET Standard wrapper arrond the api provided by https://github.com/NovelCovid/API

Awesome Lists containing this project

README

        

# IconCovid19Tracker.NET v2.0.2

[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)

This is a .NET wrapper library around the API provided by [@NovelCovid](https://github.com/NovelCovid/) https://github.com/NovelCovid/API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak.

It provides up-to-date data about Coronavirus outbreak includes confirmed cases, recovered, deaths, active, today cases, today deaths, tests and more.

![](https://github.com/egbakou/Covid19Tracker.NET/workflows/CI/badge.svg) ![CD](https://github.com/egbakou/Covid19Tracker.NET/workflows/CD/badge.svg) [![NuGet](https://img.shields.io/nuget/v/Covid19Tracker.NET.svg?label=NuGet)](https://www.nuget.org/packages/Covid19Tracker.NET/)

The version 1.0.0 doc is located [here](https://github.com/egbakou/Covid19Tracker.NET/blob/master/Docs/V1.0.0README.md).

## Setup

- Available on NuGet: https://www.nuget.org/packages/Covid19Tracker.NET/
- Install into your .NET project(.NET Standard, .NET Core, Xamarin, etc).

## Note

Add `namespace` `Covid19Tracker.Services` and call `Covid19TrackerAPI` class to access to all methods.

## Usage

- Gets global stats. Data is updated every 10 minutes.

```csharp
GlobalData data = await Covid19Tracker.GetGlobalDataAsync();
```

- Gets All Continent's Totals

```csharp
List data = await Covid19Tracker.GetContinentsDataAsync();
```

- Gets a Specific Continent Totals.

```csharp
ContinentData data = await Covid19Tracker.GetDataByContinentAsync(string contient);
```

> Continent name: "Asia", "North America", "South America", Europe", "Africa", "Australia/Oceania"

- Gets all Countries Totals

```csharp
List data = await Covid19Tracker.GetCountriesDataAsync();
```

- Get a Specific Country's Totals for Actual

```csharp
CountryData data = await Covid19Tracker.GetDataByCountryAsync(string country);
```

> Country name example: "Italy"

- Classes

```csharp
public class GlobalData
{
// Gets or sets the Updated.
public DateTime Updated { get; set; }

// Gets or sets the Cases.
public long Cases { get; set; }

// Gets or sets the TodayCases.
public long TodayCases { get; set; }

// Gets or sets the Deaths.
public long Deaths { get; set; }

// Gets or sets the TodayDeaths.
public long TodayDeaths { get; set; }

// Gets or sets the Recovered.
public long Recovered { get; set; }

// Gets or sets the Active.
public long Active { get; set; }

// Gets or sets the Critical.
public long Critical { get; set; }

// Gets or Sets Population.
public long Population { get; set; }

// Gets or sets the Tests.
public long Tests { get; set; }

// Gets or sets the AffectedCountries.
public int AffectedCountries { get; set; }
}
```

```csharp
public class ContientData
{
// Gets or sets the updated.
public DateTime Updated { get; set; }

// Gets or sets the cases.
public long Cases { get; set; }

// Gets or sets the todayCases.
public long TodayCases { get; set; }

// Gets or sets the deaths.
public long Deaths { get; set; }

// Gets or sets the todayDeaths.
public long DodayDeaths { get; set; }

// Gets or sets the recovered.
public long Recovered { get; set; }

// Gets or sets the active.
public long Active { get; set; }

// Gets or sets the critical.
public long Critical { get; set; }

// Gets or sets the continent.
public string ContinentName { get; set; }

// Gets or Sets Population.
public long Population { get; set; }

// Gets or sets the Tests.
public long Tests { get; set; }

// Gets or sets the countries.
public IList Countries { get; set; }
}
```

```csharp
public class CountryData
{
// Gets or sets the updated.
public DateTime Updated { get; set; }

// Gets or sets the cases.
public long Cases { get; set; }

// Gets or sets the todayCases.
public long TodayCases { get; set; }

// Gets or sets the deaths.
public long Deaths { get; set; }

// Gets or sets the todayDeaths.
public long DodayDeaths { get; set; }

// Gets or sets the recovered.
public long Recovered { get; set; }

// Gets or sets the active.
public long Active { get; set; }

// Gets or sets the critical.
public long Critical { get; set; }

// Gets or Sets Population.
public long Population { get; set; }

// Gets or sets Tests.
public long Tests { get; set; }

// Gets or sets the continent.
public string Continent { get; set; }
}
```

## Created by: Kodjo Laurent Egbakou

- LinkedIn: [Kodjo Laurent Egbakou](https://www.linkedin.com/in/laurentegbakou/)
- Twitter: [@lioncoding](https://twitter.com/lioncoding)

## License

The MIT License (MIT) see [License file](https://github.com/egbakou/Covid19Tracker.NET/blob/master/LICENSE)

## Contribution

Feel free to create issues and PRs 😃
## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



puf17640

💻 ⚠️ 📖

Kodjo Laurent Egbakou

💻 ⚠️ 📖 🚇 🚧

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!