feat: statistics: finish dev
This commit is contained in:
429
docs/docs.go
Normal file
429
docs/docs.go
Normal file
@@ -0,0 +1,429 @@
|
||||
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag
|
||||
package docs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/swaggo/swag"
|
||||
)
|
||||
|
||||
var doc = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/statistics/china": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "china data",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/models.ChinaData"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/city/{sort}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "city statistics",
|
||||
"parameters": [
|
||||
{
|
||||
"enum": [
|
||||
"today",
|
||||
"total",
|
||||
"now",
|
||||
"default"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "data sorted by",
|
||||
"name": "sort",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/country": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "country statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/country/child": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "country statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/provience/{sort}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "provience statistics",
|
||||
"parameters": [
|
||||
{
|
||||
"enum": [
|
||||
"today",
|
||||
"total",
|
||||
"now",
|
||||
"default"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "data sorted by",
|
||||
"name": "sort",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"models.AreaInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"children": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"today": {
|
||||
"$ref": "#/definitions/models.AreaToday"
|
||||
},
|
||||
"total": {
|
||||
"$ref": "#/definitions/models.AreaTotal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.AreaToday": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isUpdate": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.AreaTotal": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer"
|
||||
},
|
||||
"heal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"provinceLocalConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"showHeal": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"showRate": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"wzz": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChinaAdd": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer"
|
||||
},
|
||||
"heal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"importedCase": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirmH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfect": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfectH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowSevere": {
|
||||
"type": "integer"
|
||||
},
|
||||
"suspect": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChinaData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"chinaAdd": {
|
||||
"$ref": "#/definitions/models.ChinaAdd"
|
||||
},
|
||||
"chinaTotal": {
|
||||
"$ref": "#/definitions/models.ChinaTotal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChinaTotal": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer"
|
||||
},
|
||||
"heal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"importedCase": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirmH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"local_acc_confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfect": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfectH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowSevere": {
|
||||
"type": "integer"
|
||||
},
|
||||
"showLocalConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"showlocalinfeciton": {
|
||||
"type": "integer"
|
||||
},
|
||||
"suspect": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.GinResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer"
|
||||
},
|
||||
"data": {},
|
||||
"msg": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
type swaggerInfo struct {
|
||||
Version string
|
||||
Host string
|
||||
BasePath string
|
||||
Schemes []string
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = swaggerInfo{
|
||||
Version: "1.0",
|
||||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
Title: "nCov Tracker",
|
||||
Description: "",
|
||||
}
|
||||
|
||||
type s struct{}
|
||||
|
||||
func (s *s) ReadDoc() string {
|
||||
sInfo := SwaggerInfo
|
||||
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
|
||||
|
||||
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
||||
"marshal": func(v interface{}) string {
|
||||
a, _ := json.Marshal(v)
|
||||
return string(a)
|
||||
},
|
||||
"escape": func(v interface{}) string {
|
||||
// escape tabs
|
||||
str := strings.Replace(v.(string), "\t", "\\t", -1)
|
||||
// replace " with \", and if that results in \\", replace that with \\\"
|
||||
str = strings.Replace(str, "\"", "\\\"", -1)
|
||||
return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1)
|
||||
},
|
||||
}).Parse(doc)
|
||||
if err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
var tpl bytes.Buffer
|
||||
if err := t.Execute(&tpl, sInfo); err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
return tpl.String()
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register("swagger", &s{})
|
||||
}
|
||||
358
docs/swagger.json
Normal file
358
docs/swagger.json
Normal file
@@ -0,0 +1,358 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "nCov Tracker",
|
||||
"contact": {},
|
||||
"version": "1.0"
|
||||
},
|
||||
"paths": {
|
||||
"/statistics/china": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "china data",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/models.ChinaData"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/city/{sort}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "city statistics",
|
||||
"parameters": [
|
||||
{
|
||||
"enum": [
|
||||
"today",
|
||||
"total",
|
||||
"now",
|
||||
"default"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "data sorted by",
|
||||
"name": "sort",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/country": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "country statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/country/child": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "country statistics",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/statistics/provience/{sort}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Statistics"
|
||||
],
|
||||
"summary": "provience statistics",
|
||||
"parameters": [
|
||||
{
|
||||
"enum": [
|
||||
"today",
|
||||
"total",
|
||||
"now",
|
||||
"default"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "data sorted by",
|
||||
"name": "sort",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.GinResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"models.AreaInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"children": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.AreaInfo"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"today": {
|
||||
"$ref": "#/definitions/models.AreaToday"
|
||||
},
|
||||
"total": {
|
||||
"$ref": "#/definitions/models.AreaTotal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.AreaToday": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isUpdate": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.AreaTotal": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer"
|
||||
},
|
||||
"heal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"provinceLocalConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"showHeal": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"showRate": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"wzz": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChinaAdd": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer"
|
||||
},
|
||||
"heal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"importedCase": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirmH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfect": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfectH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowSevere": {
|
||||
"type": "integer"
|
||||
},
|
||||
"suspect": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChinaData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"chinaAdd": {
|
||||
"$ref": "#/definitions/models.ChinaAdd"
|
||||
},
|
||||
"chinaTotal": {
|
||||
"$ref": "#/definitions/models.ChinaTotal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChinaTotal": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer"
|
||||
},
|
||||
"heal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"importedCase": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"localConfirmH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"local_acc_confirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfect": {
|
||||
"type": "integer"
|
||||
},
|
||||
"noInfectH5": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"nowSevere": {
|
||||
"type": "integer"
|
||||
},
|
||||
"showLocalConfirm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"showlocalinfeciton": {
|
||||
"type": "integer"
|
||||
},
|
||||
"suspect": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.GinResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer"
|
||||
},
|
||||
"data": {},
|
||||
"msg": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
219
docs/swagger.yaml
Normal file
219
docs/swagger.yaml
Normal file
@@ -0,0 +1,219 @@
|
||||
definitions:
|
||||
models.AreaInfo:
|
||||
properties:
|
||||
children:
|
||||
items:
|
||||
$ref: '#/definitions/models.AreaInfo'
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
today:
|
||||
$ref: '#/definitions/models.AreaToday'
|
||||
total:
|
||||
$ref: '#/definitions/models.AreaTotal'
|
||||
type: object
|
||||
models.AreaToday:
|
||||
properties:
|
||||
confirm:
|
||||
type: integer
|
||||
isUpdate:
|
||||
type: boolean
|
||||
type: object
|
||||
models.AreaTotal:
|
||||
properties:
|
||||
confirm:
|
||||
type: integer
|
||||
dead:
|
||||
type: integer
|
||||
heal:
|
||||
type: integer
|
||||
nowConfirm:
|
||||
type: integer
|
||||
provinceLocalConfirm:
|
||||
type: integer
|
||||
showHeal:
|
||||
type: boolean
|
||||
showRate:
|
||||
type: boolean
|
||||
wzz:
|
||||
type: integer
|
||||
type: object
|
||||
models.ChinaAdd:
|
||||
properties:
|
||||
confirm:
|
||||
type: integer
|
||||
dead:
|
||||
type: integer
|
||||
heal:
|
||||
type: integer
|
||||
importedCase:
|
||||
type: integer
|
||||
localConfirm:
|
||||
type: integer
|
||||
localConfirmH5:
|
||||
type: integer
|
||||
noInfect:
|
||||
type: integer
|
||||
noInfectH5:
|
||||
type: integer
|
||||
nowConfirm:
|
||||
type: integer
|
||||
nowSevere:
|
||||
type: integer
|
||||
suspect:
|
||||
type: integer
|
||||
type: object
|
||||
models.ChinaData:
|
||||
properties:
|
||||
chinaAdd:
|
||||
$ref: '#/definitions/models.ChinaAdd'
|
||||
chinaTotal:
|
||||
$ref: '#/definitions/models.ChinaTotal'
|
||||
type: object
|
||||
models.ChinaTotal:
|
||||
properties:
|
||||
confirm:
|
||||
type: integer
|
||||
dead:
|
||||
type: integer
|
||||
heal:
|
||||
type: integer
|
||||
importedCase:
|
||||
type: integer
|
||||
local_acc_confirm:
|
||||
type: integer
|
||||
localConfirm:
|
||||
type: integer
|
||||
localConfirmH5:
|
||||
type: integer
|
||||
noInfect:
|
||||
type: integer
|
||||
noInfectH5:
|
||||
type: integer
|
||||
nowConfirm:
|
||||
type: integer
|
||||
nowSevere:
|
||||
type: integer
|
||||
showLocalConfirm:
|
||||
type: integer
|
||||
showlocalinfeciton:
|
||||
type: integer
|
||||
suspect:
|
||||
type: integer
|
||||
type: object
|
||||
models.GinResponse:
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
data: {}
|
||||
msg: {}
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
title: nCov Tracker
|
||||
version: "1.0"
|
||||
paths:
|
||||
/statistics/china:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.GinResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/models.ChinaData'
|
||||
type: object
|
||||
summary: china data
|
||||
tags:
|
||||
- Statistics
|
||||
/statistics/city/{sort}:
|
||||
get:
|
||||
parameters:
|
||||
- description: data sorted by
|
||||
enum:
|
||||
- today
|
||||
- total
|
||||
- now
|
||||
- default
|
||||
in: path
|
||||
name: sort
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.GinResponse'
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/models.AreaInfo'
|
||||
type: array
|
||||
type: object
|
||||
summary: city statistics
|
||||
tags:
|
||||
- Statistics
|
||||
/statistics/country:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.GinResponse'
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/models.AreaInfo'
|
||||
type: array
|
||||
type: object
|
||||
summary: country statistics
|
||||
tags:
|
||||
- Statistics
|
||||
/statistics/country/child:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.GinResponse'
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/models.AreaInfo'
|
||||
type: array
|
||||
type: object
|
||||
summary: country statistics
|
||||
tags:
|
||||
- Statistics
|
||||
/statistics/provience/{sort}:
|
||||
get:
|
||||
parameters:
|
||||
- description: data sorted by
|
||||
enum:
|
||||
- today
|
||||
- total
|
||||
- now
|
||||
- default
|
||||
in: path
|
||||
name: sort
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.GinResponse'
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/models.AreaInfo'
|
||||
type: array
|
||||
type: object
|
||||
summary: provience statistics
|
||||
tags:
|
||||
- Statistics
|
||||
swagger: "2.0"
|
||||
Reference in New Issue
Block a user