项目作者: lukasz-zbrzeski

项目描述 :
Coronavirus COVID-19 API
高级语言: Java
项目地址: git://github.com/lukasz-zbrzeski/COVID-19-API.git
创建时间: 2020-03-19T10:29:49Z
项目社区:https://github.com/lukasz-zbrzeski/COVID-19-API

开源协议:MIT License

下载


Coronavirus COVID-19 API

API displays global statistics for COVID-19 (confirmed cases, deaths cases, recovered cases and actual cases), statistics for location (country, region, city) and searching historical data about COVID-19 cases.

Technologies

Project is created with:

  • Java 8
  • Spring Boot 2.2.5
  • Apache Commons CSV 1.8
  • Jackson 2.10.2

Endpoints

Base URL
  1. https://coronavirus-covid-19-api.herokuapp.com/

Getting actual data of COVID-19

Request
  1. GET /api/actual
Output
  1. {
  2. "data": {
  3. "active": 1820433,
  4. "confirmed": 2811193,
  5. "deaths": 197159,
  6. "recovered": 793601
  7. }
  8. }

Getting actual data by country and/or region

Requests
  1. GET /api/actual/location?country={country}
  1. GET /api/actual/location?country={countryion={region}
  1. GET /api/actual/location?country={countryion={region}&city={city}
Output
  1. {
  2. "last_update": "2020-04-25 06:30:53",
  3. "location": {
  4. "city": "Los Angeles",
  5. "country": "US",
  6. "region": "California"
  7. },
  8. "coordinates": {
  9. "lat": "34.30828379",
  10. "lon": "-118.2282411"
  11. },
  12. "data": {
  13. "active": 17695,
  14. "confirmed": 18545,
  15. "deaths": 850,
  16. "recovered": 0
  17. }
  18. }

Getting historical data of COVID-19

Request
  1. GET /api/history/{MM-dd-yyyy}/
Output
  1. {
  2. "date": "03-10-2020",
  3. "data": {
  4. "active": 49916,
  5. "confirmed": 118582,
  6. "deaths": 4262,
  7. "recovered": 64404
  8. }
  9. }

Data source

COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University

License

MIT