-
Notifications
You must be signed in to change notification settings - Fork 16
/
keyplays.malcsilberman.repl.co.yaml
337 lines (336 loc) · 11.1 KB
/
keyplays.malcsilberman.repl.co.yaml
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
openapi: 3.0.1
info:
title: Keyplays Football/Soccer Plugin
description: A plugin that provides detailed football match information.
version: 'v1'
servers:
- url: https://keyplays.malcsilberman.repl.co
paths:
/chat/fetch_game:
get:
operationId: fetch_game
summary: Fetch game data for dates for a team or league, returns participants, tvstations, weather, venue. Request commentary, lineups, coaches, referees, statistics, events, sidelined players, predictions.
parameters:
- name: team_search
in: query
description: The team name or part of the team name to search for
required: false
schema:
type: string
- name: country_league
in: query
description: The country or league name to search for
required: false
schema:
type: string
- name: iso
in: query
description: The ISO 3166-2 code to filter the results by country
required: false
schema:
type: string
- name: start_date
in: query
description: The start date for the date range to search for games (format YYYY-MM-DD)
required: false
schema:
type: string
format: date
- name: end_date
in: query
description: The optional end date for the date range to search for games (format YYYY-MM-DD) uses the start date if not present
required: false
schema:
type: string
format: date
- name: timezone
in: query
description: Overrides the timezone if the user provides an optional timezone
required: false
schema:
type: string
- name: include
in: query
description: Additional data to be requested in the response; possible values are trends, timeline, commentary, lineups, coaches, referees, statistics, events, sidelined, predictions
required: false
schema:
type: string
enum:
- trends
- timeline
- commentary
- lineups
- coaches
- referees
- statistics
- events
- sidelined
- predictions
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
# Define the response properties here
/chat/fetch_standings:
get:
operationId: fetchStandings
summary: Get football standings tables try return all teams in table format
parameters:
- name: league_search
in: query
description: name of the league and if possible prefix the country since some leagues share the same names, it is also possible to search for a countries league and get back the league
required: false
schema:
type: string
- name: timezone
in: query
description: Overides the timezone if the use provides and optional timezone
required: false
schema:
type: string
- in: query
name: year
schema:
type: string
description: The year for the standings, in cases where season cross years we use the start year, if a user gives 2020/2021 then use 2020. For current year leave blank.
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
# Define the response properties here
/chat/fetch_tvstations:
get:
operationId: fetchTvStations
summary: Get TV stations broadcasting football matches, specify in order an optional country and leaque name, or blank for all leagues, return data should include team postions.
parameters:
- name: league_search
in: query
description: Name of country or league or mix of these two returns a league id.
required: false
schema:
type: string
- name: iso
in: query
description: The optional ISO 3166-2 code to filter the results by country.
required: false
schema:
type: string
- name: date
in: query
description: The date for which to retrieve match information (format YYYY-MM-DD). If not provided, todays date will be used.
required: false
schema:
type: string
format: date
- name: timezone
in: query
description: Overides the timezone if the user provides an optional timezone.
required: false
schema:
type: string
responses:
"200":
description: Returns league name, date, games, teams playing, team positions, tv stations for your country.
content:
application/json:
schema:
type: object
properties:
# Define the response properties here
/chat/leagues_today:
get:
operationId: fetchLeaguesToday
summary: Fetches worldwide leagues and games being played today or provide a date, return leagues and games.
parameters:
- in: query
name: date
schema:
type: string
format: date
description: Date for which to fetch leagues and games
- in: query
name: iso
schema:
type: string
description: ISO 3166-2 country code
- in: header
name: openai-subdivision-1-iso-code
schema:
type: string
required: false
description: OpenAI subdivision ISO code
- in: query
name: timezone
schema:
type: string
description: Timezone
responses:
"200":
description: Returns league name, games, teams playing, starting date/time, result
content:
application/json:
schema:
type: object
properties:
/chat/playerSearch:
get:
operationId: fetchPlayerSearch
summary: Fetches details for a player using search by providing the player name. Can request statistics as an include.
parameters:
- in: query
name: name
schema:
type: string
description: Name of the player for which to fetch details must be spelled correctly
- in: query
name: iso
schema:
type: string
description: ISO 3166-2 country code
- in: header
name: openai-subdivision-1-iso-code
schema:
type: string
required: false
description: OpenAI subdivision ISO code
- in: query
name: timezone
schema:
type: string
description: Timezone
- in: query
name: page
schema:
type: integer
default: 1
description: Page number for pagination
- in: query
name: year
schema:
type: string
description: The year for the statistics, if seasons cross years then input 2022 will give statistics for 2021/2022 and 2022/2023 seasons
- name: include
in: query
description: Additional data to be requested in the response; possible value is statistics
required: false
schema:
type: string
enum:
- statistics
responses:
"200":
description: Returns player details such as country, city, nationality, transfers, teams, trophies, seasons, statistics etc.
content:
application/json:
schema:
type: object
properties:
# Define the properties here
/chat/teamSquad:
get:
operationId: fetchTeamSquad
summary: Fetches squad, players and coaches details for a particular team.
parameters:
- in: query
name: team_search
schema:
type: string
description: Name of the team for which to fetch squad, players and coaches details
- in: query
name: iso
schema:
type: string
description: ISO 3166-2 country code
- in: header
name: openai-subdivision-1-iso-code
schema:
type: string
required: false
description: OpenAI subdivision ISO code
- in: query
name: timezone
schema:
type: string
description: Timezone
- in: query
name: page
schema:
type: integer
default: 1
description: Page number for pagination
responses:
"200":
description: Returns players and coaches details for a particular team, including country, nationality, detailed position, coaches and coaches country.
content:
application/json:
schema:
type: object
properties:
# Define the properties here
"400":
description: Returns an error message if the team name is not provided.
content:
application/json:
schema:
type: object
properties:
message:
type: string
/chat/fetchUpcomingTeams:
get:
operationId: fetchUpcomingTeams
summary: Fetches upcoming information for a particular team.
parameters:
- in: query
name: team_search
schema:
type: string
description: Name of the team for which to fetch upcoming information
- in: query
name: iso
schema:
type: string
description: ISO 3166-2 country code
- in: header
name: openai-subdivision-1-iso-code
schema:
type: string
required: false
description: OpenAI subdivision ISO code
- in: query
name: timezone
schema:
type: string
description: Timezone
- in: query
name: page
schema:
type: integer
default: 1
description: Page number for pagination
responses:
"200":
description: Returns upcoming information for a particular team, including venue, sidelined players, coaches, referees, league details, scores, start times, player images.
content:
application/json:
schema:
type: object
properties:
# Define the properties here
"400":
description: Returns an error message if the team name is not provided.
content:
application/json:
schema:
type: object
properties:
message:
type: string