covid4j

Java API for fetching Covid-19 Stats for Countries/Cities/States

Лицензия

Лицензия

Категории

Категории

Ninja Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

io.javaninja.ajeet
Идентификатор

Идентификатор

covid4j
Последняя версия

Последняя версия

1.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

covid4j
Java API for fetching Covid-19 Stats for Countries/Cities/States
Ссылка на сайт

Ссылка на сайт

https://javaninja.io
Система контроля версий

Система контроля версий

https://github.com/javaninjacloud/covid4j

Скачать covid4j

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.javaninja.ajeet/covid4j/ -->
<dependency>
    <groupId>io.javaninja.ajeet</groupId>
    <artifactId>covid4j</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/io.javaninja.ajeet/covid4j/
implementation 'io.javaninja.ajeet:covid4j:1.0.3'
// https://jarcasting.com/artifacts/io.javaninja.ajeet/covid4j/
implementation ("io.javaninja.ajeet:covid4j:1.0.3")
'io.javaninja.ajeet:covid4j:jar:1.0.3'
<dependency org="io.javaninja.ajeet" name="covid4j" rev="1.0.3">
  <artifact name="covid4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.javaninja.ajeet', module='covid4j', version='1.0.3')
)
libraryDependencies += "io.javaninja.ajeet" % "covid4j" % "1.0.3"
[io.javaninja.ajeet/covid4j "1.0.3"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.jsoup : jsoup jar 1.13.1

Модули Проекта

Данный проект не имеет модулей.

covid4j - Java API for pulling Covid-19 Stats

Spring Boot REST Api for fetching Covid-19 Stats for country/state/city

Data is sourced from WHO and is regularly updated. More details available here:- https://javaninja.io/spring-boot-rest-api-for-pulling-covid-19-stats/

Include the following maven dependency:-

<dependency>
    <groupId>io.javaninja.ajeet</groupId>
    <artifactId>covid4j</artifactId>
    <version>1.0.3</version>
</dependency>

API's exposed:-

Get data by country:-

@GetMapping("/getCovidDataByCountry/{country}")
    public CovidStats getCovidDataByCountry(@PathVariable String country) throws IOException {

        return CovidApi.getAllCovidStatsForCountry(country);
    }

Get data by state or city:-

@GetMapping("/getCovidDataByCityOrState/{cityOrState}")
    public CovidStats getCovidDataByCityOrState(@PathVariable String cityOrState) throws IOException {

        return CovidApi.getAllCovidStatsForCityOrState(cityOrState);
    }

Params 'country' and 'cityOrState' are not case-sensitive.

Sample response for country 'India'

{
    "name": "india",
    "type": "country",
    "confirmed": "321K",
    "recovered": "162K",
    "deaths": "9,195",
    "confirmedNewCases": "+11,929",
    "confirmedNewDeaths": "+311",
    "lastUpdated": "Updated less than 20 mins ago"
}
io.javaninja.ajeet

Java Ninja

An Organization which believes in all things open source.

Версии библиотеки

Версия
1.0.3
1.0.2
1.0.1
1.0.0