The Covid-19-API is a useful API for getting an overview about the Covid-19 cases and other information. The data is stored in different java classes.
The API works with the Gson library to collect the information with a simple data class. The exact data structure of the COVID-19 API is provided in the API package. You can store and collect the data in the classes.
Note: The API based on the COVID-19 API by Marlon Lückert. (This API is only available for Germany). Based on this API, additional functions are added.
To achieve better handling, the API is expanded with a new simple prefabricated loading and store system. Additional functions:
- Adjustable timeslots to collect data
- Summarized data for Germany available (incidence, deaths, recovered, cases, age-groups, ...)
- Improved performance because of collecting only dedicated data
- Simple information classes provided for use in java
//Loading and storing the data as a variable
CountryData countryData = Covid19API.getCountry(CountryValue.GERMANY);
String cases = countryData.getCasesHistory().getLatestCases().cases;
String date = countryData.getCasesHistory().getLatestCases().date;
//Refreshing certain stored data values
countryData.getDataCollector().refreshCaseHistory();
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.ZeusSeinGrossopa</groupId>
<artifactId>Covid19-Java-API</artifactId>
<version>1.0</version>
</dependency>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.ZeusSeinGrossopa:Covid19-Java-API:1.0'
}