-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathapiary.apib
255 lines (214 loc) · 8.54 KB
/
apiary.apib
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
FORMAT: 1A
# Olympics API
Olympics API is a simple API, allowing one to gather information on particular entities of the Olympics Games.
# Group Olympics
Resources of the **Olympics API**
## Olympics Collection [/scrape/olympics]
A list of all olympic games
### List all Olympic Games [GET]
+ Response 200 (application/json)
{
"0":{
"id": Olympics_ID_as_int,
"year": "Year_as_int,
"season": "Season type (Summer/Winter)",
"city" "Host City Name",
"country": "Host Country Name",
"events": [
{
"id": "Event_ID",
"name": "Event Name",
"sport": "Sport Name"
}
]
}
}
## Olympics [/scrape/olympics/{id}]
A single olympic games with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Olympics desired. Has example value.
### Retrieve Olympic Games [GET]
+ Response 200 (application/json)
{
"id": Olympics_ID_as_int,
"year": "Year_as_int,
"season": "Season type (Summer/Winter)",
"city" "Host City Name",
"country": "Host Country Name",
"events": [
{
"id": "Event_ID",
"name": "Event Name",
"sport": "Sport Name"
}
]
}
## Countries Collection [/scrape/countries]
A list of all countries
### List all Countries [GET]
+ Response 200 (application/json)
{
"0":{
"id": Country_ID_as_int,
"name": "Country Name",
"olympics-hosted": [
{
"id": "Olympics_ID",
"year": "Year"
"season": "Season type (Summer/Winter)",
"city": "City Name"
}
]
}
}
## Country [/scrape/countries/{id}]
A single country with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Country desired. Has example value.
### Retrieve Country [GET]
+ Response 200 (application/json)
{
"id": Country_ID_as_int,
"name": "Country Name",
"olympics-hosted": [
{
"id": "Olympics_ID",
"year": "Year",
"season": "Season type (Summer/Winter)",
"city": "City Name"
}
]
}
## Events Collection [/scrape/events]
A list of all events
### List all Events [GET]
+ Response 200 (application/json)
{
"0":{
"id": Event_ID_as_int,
"name": "Event Name",
"sport": "Sport Name",
"olympics": [
{
"id": "Olympic_ID",
"year": "Year",
"season": "Season type (Summer/Winter)"
}
]
}
}
## Event [/scrape/events/{id}]
A single event with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Event desired. Has example value.
### Retrieve Event [GET]
+ Response 200 (application/json)
{
"id": Event_ID_as_int,
"name": "Event Name",
"sport": "Sport Name",
"olympics": [
{
"id": "Olympic_ID",
"year": "Year",
"season": "Season type (Summer/Winter)"
}
]
}
## Athletes Collection [/scrape/athletes]
A list of all athletes
### List all Athletes [GET]
+ Response 200 (application/json)
{
"0":
{
"id": Athlete_ID_as_int,
"first": "Athlete's first Name",
"last": "Athlete's last Name",
"gender": "Athlete's gender",
"medals": [
{
"id": "Medal_ID",
"rank": "Medal Rank",
"event": "Event Name",
"sport": "Sport Name",
"season": "Season type (Summer/Winter)",
"year": "Year",
"repr": "Represented Country Name"
}
]
}
]
## Athlete [/scrape/athletes/{id}]
A single athlete with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Athlete desired. Has example value.
### Retrieve Athlete [GET]
+ Response 200 (application/json)
{
"id": Athlete_ID_as_int,
"first": "Athlete's first Name",
"last": "Athlete's last Name",
"gender": "Athlete's gender",
"medals": [
{
"id": "Medal_ID",
"rank": "Medal Rank",
"event": "Event Name",
"sport": "Sport Name",
"season": "Season type (Summer/Winter)",
"year": "Year",
"repr": "Represented Country Name"
}
]
}
## Medals Collection [/scrape/medals]
A list of all medals
### List all Medals [GET]
+ Response 200 (application/json)
{
"0":{
"id": Medal_ID_as_int,
"rank": "Medal Rank",
"athlete": "Athlete Name",
"event": "Event Name",
"year": Year_as_int,
"city": "Host City Name",
"country": "Host Country Name"
}
}
## Medal [/scrape/medals/{id}]
A single medal with all its details
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Medal desired. Has example value.
### Retrieve Medal [GET]
+ Response 200 (application/json)
{
"id": Medal_ID_as_int,
"rank": "Medal Rank",
"athlete": "Athlete Name",
"event": "Event Name",
"sport": "Sport Name",
"year": Year_as_int,
"city": "Host City Name",
"country": "Host Country Name"
}
## Medals By Rank [/scrape/medals/{rank}]
A list of a certain medal rank with all its details
+ Parameters
+ rank (required, string, `bronze`) ... String `id` of the Medal desired. Has example value.
### List All Medals By Rank [GET]
+ Response 200 (application/json)
{
"0":
{
"id": Medal_ID_as_int,
"rank": "Medal Rank",
"athlete": "Athlete Name",
"event": "Event Name",
"sport": "Sport Name",
"year": Year_as_int,
"city": "Host City Name",
"country": "Host Country Name"
}
]