{
    "openapi": "3.0.0",
    "info": {
        "title": "省市疫情 - API文档",
        "version": "1.0.0",
        "description": "肺炎疫情省市病例数据，因数据较大，示例中仅列举湖北省内情况。实际调用时，返回全部省市数据。以上数据仅供参考，请以各地卫生防疫部门实时发布的数据为准。另外请注意，各省市的疑似病例官方未公开，故全部为零。本接口完全免费，用完可继续申请测试额度。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/ncovcity\/index": {
            "get": {
                "summary": "省市疫情查询",
                "tags": [
                    "省市疫情"
                ],
                "description": "查询全国省市费用疫情感染数详细数据",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "description": "查询某天的数据",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2020-02-12",
                            "description": "查询某天的数据"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "cityName": {
                                            "type": "string",
                                            "example": "武汉",
                                            "description": "城市名称"
                                        },
                                        "deadCount": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "死亡病例"
                                        },
                                        "curedCount": {
                                            "type": "int",
                                            "example": 31,
                                            "description": "治愈病例"
                                        },
                                        "confirmedCount": {
                                            "type": "int",
                                            "example": 495,
                                            "description": "确诊人数"
                                        },
                                        "suspectedCount": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "疑似病例"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "cities": [
                                                    {
                                                        "cityName": "武汉",
                                                        "deadCount": 0,
                                                        "curedCount": 31,
                                                        "confirmedCount": 495,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "孝感",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 22,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "黄冈",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 12,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "荆州",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 8,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "荆门",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 8,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "仙桃",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 2,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "宜昌",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 1,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "十堰",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 1,
                                                        "suspectedCount": 0
                                                    }
                                                ],
                                                "comment": "",
                                                "deadCount": 24,
                                                "curedCount": 31,
                                                "provinceName": "湖北省",
                                                "confirmedCount": 549,
                                                "suspectedCount": 0,
                                                "provinceShortName": "湖北"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "省市疫情查询",
                "tags": [
                    "省市疫情"
                ],
                "description": "查询全国省市费用疫情感染数详细数据",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "date": {
                                        "type": "string",
                                        "example": "2020-02-12",
                                        "description": "查询某天的数据"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "cityName": {
                                            "type": "string",
                                            "example": "武汉",
                                            "description": "城市名称"
                                        },
                                        "deadCount": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "死亡病例"
                                        },
                                        "curedCount": {
                                            "type": "int",
                                            "example": 31,
                                            "description": "治愈病例"
                                        },
                                        "confirmedCount": {
                                            "type": "int",
                                            "example": 495,
                                            "description": "确诊人数"
                                        },
                                        "suspectedCount": {
                                            "type": "int",
                                            "example": 0,
                                            "description": "疑似病例"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "cities": [
                                                    {
                                                        "cityName": "武汉",
                                                        "deadCount": 0,
                                                        "curedCount": 31,
                                                        "confirmedCount": 495,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "孝感",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 22,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "黄冈",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 12,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "荆州",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 8,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "荆门",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 8,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "仙桃",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 2,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "宜昌",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 1,
                                                        "suspectedCount": 0
                                                    },
                                                    {
                                                        "cityName": "十堰",
                                                        "deadCount": 0,
                                                        "curedCount": 0,
                                                        "confirmedCount": 1,
                                                        "suspectedCount": 0
                                                    }
                                                ],
                                                "comment": "",
                                                "deadCount": 24,
                                                "curedCount": 31,
                                                "provinceName": "湖北省",
                                                "confirmedCount": 549,
                                                "suspectedCount": 0,
                                                "provinceShortName": "湖北"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}