forked from ExpDev07/coronavirus-tracker-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoronavirus-tracker-api-swagger.yaml
More file actions
152 lines (152 loc) · 3.73 KB
/
coronavirus-tracker-api-swagger.yaml
File metadata and controls
152 lines (152 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
swagger: '2.0'
info:
description: 'Corona Virus Tracker API based on JHU data sets. https://github.com/ExpDev07/coronavirus-tracker-api'
version: 1.0.0
title: Corona Virus Tracker API
contact:
url: https://github.com/ExpDev07/coronavirus-tracker-api
host: coronavirus-tracker-api.herokuapp.com
basePath: /v2
schemes:
- https
paths:
/latest:
get:
summary: Latest global Corona stats
operationId: latest
produces:
- application/json
responses:
'200':
description: successful operation
schema:
type: object
properties:
latest:
type: object
properties:
confirmed:
type: number
example: 214910
deaths:
type: number
example: 8733
recovered:
type: number
example: 83207
/locations:
get:
summary: All Locations
operationId: allLocations
produces:
- application/json
parameters:
- name: country_code
in: query
description: "ISO alpha 2 country code. https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"
required: false
type: string
x-example: US
- name: timelines
in: query
description: "Include timeline objects in response? true or false"
required: false
type: string
x-example: true
responses:
'200':
description: successful operation
schema:
type: object
properties:
locations:
type: array
items:
$ref: '#/definitions/Location'
'/locations/{id}':
get:
summary: location
operationId: location
produces:
- application/json
parameters:
- name: id
in: path
description: "Internal ID"
required: true
type: string
x-example: 39
responses:
'200':
description: successful operation
schema:
type: object
properties:
location:
$ref: '#/definitions/Location'
'404':
description: Location not found
definitions:
Location:
type: object
properties:
coordinates:
type: object
properties:
latitude:
type: string
example: "47.4009"
longitude:
type: string
example: "-121.4905"
country:
type: string
example: "US"
country_code:
type: string
example: US
id:
type: number
example: 98
latest:
type: object
properties:
confirmed:
type: number
example: 1014
deaths:
type: number
example: 55
recovered:
type: number
example: 10
province:
type: string
example: "Washington"
timelines:
type: object
properties:
confirmed:
type: object
properties:
latest:
type: number
example: 1014
timeline:
type: object
deaths:
type: object
properties:
latest:
type: number
example: 55
timeline:
type: object
recovered:
type: object
properties:
latest:
type: number
example: 10
timeline:
type: object