COVID-19 API (Independent Publisher) (#1325)

* initialise repo

* IP COVID-19 API

swagger and readme updated

* Folder name changed

* Update apiDefinition.swagger.json

* COVID Swagger Updated and connector renamied

* API Name updated to COVID-19 JHU CSSE

from COVID-19 to COVID-19 JHU CSSE
This commit is contained in:
Woong 2022-02-08 05:04:43 +08:00 коммит произвёл GitHub
Родитель 1d24313891
Коммит c601d06d8c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 581 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,534 @@
{
"swagger": "2.0",
"info": {
"title": "COVID-19 JHU CSSE",
"description": "Simply FAST API for COVID-19 cases exploration. This API provides the information regarding '2019 Novel Coronavirus (covid-19)'. It contains a number of confirmed, death, and recovered cases based on the data provided by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE).",
"version": "1.0",
"contact": {
"name": "Woong Choi",
"email": "Woong.Choi@sevensigma.com.au"
}
},
"host": "covid2019-api.herokuapp.com",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/v2/current": {
"get": {
"tags": [
"v2"
],
"summary": "Get Current",
"description": "Get the current situation data from all reported countries",
"operationId": "Get_current_v2_current_get",
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "A country's name"
},
"confirmed": {
"type": "integer",
"format": "int32",
"description": "Confirmed cases"
},
"deaths": {
"type": "integer",
"format": "int32",
"description": "Death cases"
},
"recovered": {
"type": "integer",
"format": "int32",
"description": "Recovered cases"
},
"active": {
"type": "integer",
"format": "int32",
"description": "Active cases"
}
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"parameters": [],
"produces": [
"application/json"
]
}
},
"/v2/current/US": {
"get": {
"tags": [
"v2"
],
"summary": "Get Current Us",
"description": "Get all data from USA's current situation",
"operationId": "Get_current_us_v2_current_US_get",
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Province_State": {
"type": "string",
"description": "State's name"
},
"Confirmed": {
"type": "integer",
"format": "int32",
"description": "Confirmed cases"
},
"Deaths": {
"type": "integer",
"format": "int32",
"description": "Death cases"
},
"Recovered": {
"type": "integer",
"format": "int32",
"description": "Recovered cases"
},
"Active": {
"type": "integer",
"format": "int32",
"description": "Active cases"
}
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"parameters": [],
"produces": [
"application/json"
]
}
},
"/v2/total": {
"get": {
"tags": [
"v2"
],
"summary": "Get Total",
"description": "Get the total numbers of all cases",
"operationId": "Get_total_v2_total_get",
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"confirmed": {
"type": "integer",
"format": "int32",
"description": "Confirmed cases"
},
"deaths": {
"type": "integer",
"format": "int32",
"description": "Death cases"
},
"recovered": {
"type": "integer",
"format": "int32",
"description": "Recovered cases"
},
"active": {
"type": "integer",
"format": "int32",
"description": "Active case"
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"parameters": [],
"produces": [
"application/json"
]
}
},
"/v2/confirmed": {
"get": {
"tags": [
"v2"
],
"summary": "Get Confirmed",
"description": "Get the total numbers of confirmed cases",
"operationId": "Get_confirmed_v2_confirmed_get",
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"confirmed": {
"type": "integer",
"format": "int32",
"description": "Confirmed cases"
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"parameters": [],
"produces": [
"application/json"
]
}
},
"/v2/deaths": {
"get": {
"tags": [
"v2"
],
"summary": "Get Deaths",
"description": "Get the total numbers of death cases",
"operationId": "Get_deaths_v2_deaths_get",
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"deaths": {
"type": "integer",
"format": "int32",
"description": "Death cases"
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"parameters": [],
"produces": [
"application/json"
]
}
},
"/v2/recovered": {
"get": {
"tags": [
"v2"
],
"summary": "Get Recovered",
"description": "Get the total numbers of recovered cases",
"operationId": "Get_recovered_v2_recovered_get",
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"recovered": {
"type": "integer",
"format": "int32",
"description": "Recovered cases"
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"parameters": [],
"produces": [
"application/json"
]
}
},
"/v2/active": {
"get": {
"tags": [
"v2"
],
"summary": "Get Active",
"description": "Get the total numbers of active cases",
"operationId": "Get_active_v2_active_get",
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"active": {
"type": "integer",
"format": "int32",
"description": "Active case"
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"parameters": [],
"produces": [
"application/json"
]
}
},
"/v2/country/{country_name}": {
"get": {
"tags": [
"v2"
],
"summary": "Get Country",
"description": "Get the data based on a county's name or its ISO code",
"operationId": "Get_country_v2_country_country_name_get",
"parameters": [
{
"required": true,
"name": "country_name",
"in": "path",
"type": "string",
"x-ms-summary": "Country Name",
"description": "Country Name in ISO 3166-1 alpha-2 format. E.g. AU for Australia or KR for Korea",
"x-ms-url-encoding": "single"
}
],
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "A country's name"
},
"confirmed": {
"type": "integer",
"format": "int32",
"description": "Confirmed cases"
},
"deaths": {
"type": "integer",
"format": "int32",
"description": "Death cases"
},
"recovered": {
"type": "integer",
"format": "int32",
"description": "Recovered cases"
},
"active": {
"type": "integer",
"format": "int32",
"description": "Active case"
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"produces": [
"application/json"
]
}
},
"/v2/timeseries/{case}": {
"get": {
"tags": [
"v2"
],
"summary": "Get Time Series",
"description": "Get the time series based on a given case: global, confirmed, deaths, recovered",
"operationId": "Get_time_series_v2_timeseries_case_get",
"parameters": [
{
"required": true,
"name": "case",
"in": "path",
"type": "string",
"x-ms-summary": "Case Type",
"description": "Type of case. Available options: global, confirmed, deaths, recovered",
"x-ms-url-encoding": "single"
}
],
"responses": {
"200": {
"description": "Successful Response",
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
}
},
"description": "Records"
},
"dt": {
"type": "string",
"description": "DateTime"
},
"ts": {
"type": "integer",
"format": "int32",
"description": "Timestamp"
}
}
}
}
},
"produces": [
"application/json"
]
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {},
"security": [],
"tags": [],
"x-components": {},
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://nuttaphat.com/covid19-api/"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://github.com/CSSEGISandData/COVID-19"
},
{
"propertyName": "Categories",
"propertyValue": "Data"
}
]
}

Просмотреть файл

@ -0,0 +1,9 @@
{
"properties": {
"connectionParameters": {},
"iconBrandColor": "#da3b01",
"capabilities": [],
"publisher": "Woong Choi",
"stackOwner": "Nuttaphat Arunoprayoch"
}
}

Просмотреть файл

@ -0,0 +1,38 @@
# COVID-19 JHU CSSE
This API provides the information regarding '2019 Novel Coronavirus (covid-19)'. It contains a number of confirmed, death, and recovered cases based on the data provided by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE).
## Publisher: Woong Choi
## Supported Operations
### Get current data
Get all data from all the reportedly affected countries
### Get total data
Get the total numbers of Confirmed, Deaths, and Recovered
### Get confirmed cases
Get the total number of Confirmed cases
### Get deaths
Get the total number of Deaths
### Get recovered cases
Get the total number of Recovered cases
### Get active cases
Get the total number of Active cases (Excluding Deaths and Recovered)
### Get a country data
Search a country by an [ISO country code (alpha2)]
### Get time series
Get the time series: global, confirmed, deaths, recovered
### Get current (US)
Get all data from USA's current situation
## Getting Started
Visit [COVID-19 API](https://nuttaphat.com/covid19-api/) page for further details.
## Reference
Source Data - https://github.com/CSSEGISandData/COVID-19