cfbd 5.3.2-alpha.0 → 5.4.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfbd",
3
- "version": "5.3.2-alpha.0",
3
+ "version": "5.4.4-alpha.0",
4
4
  "description": "This API is in limited Beta for Patreon subscribers. It may have bugs and is subject to changes. API keys can be acquired from the CollegeFootballData.com website.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,11 +21,12 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@hey-api/client-fetch": "^0.2.4"
24
+ "@hey-api/client-fetch": "^0.6.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@hey-api/openapi-ts": "^0.52.9",
28
- "@types/node": "^22.5.0",
29
- "typescript": "^5.5.4"
27
+ "@hey-api/openapi-ts": "^0.61.1",
28
+ "@types/node": "^22.10.5",
29
+ "tsc": "^2.0.4",
30
+ "typescript": "^5.7.2"
30
31
  }
31
32
  }
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- export * from './schemas.gen';
3
- export * from './services.gen';
2
+ export * from './sdk.gen';
4
3
  export * from './types.gen';
package/src/sdk.gen.ts ADDED
@@ -0,0 +1,576 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import { createClient, createConfig, type OptionsLegacyParser } from '@hey-api/client-fetch';
4
+ import type { GetAdjustedTeamSeasonStatsData, GetAdjustedTeamSeasonStatsError, GetAdjustedTeamSeasonStatsResponse, GetAdjustedPlayerPassingStatsData, GetAdjustedPlayerPassingStatsError, GetAdjustedPlayerPassingStatsResponse, GetAdjustedPlayerRushingStatsData, GetAdjustedPlayerRushingStatsError, GetAdjustedPlayerRushingStatsResponse, GetKickerPaarData, GetKickerPaarError, GetKickerPaarResponse, GetTeamsData, GetTeamsError, GetTeamsResponse, GetFbsTeamsData, GetFbsTeamsError, GetFbsTeamsResponse, GetMatchupData, GetMatchupError, GetMatchupResponse, GetRosterData, GetRosterError, GetRosterResponse, GetConferencesError, GetConferencesResponse, GetTalentData, GetTalentError, GetTalentResponse, GetVenuesError, GetVenuesResponse, GetPlayerSeasonStatsData, GetPlayerSeasonStatsError, GetPlayerSeasonStatsResponse, GetTeamStatsData, GetTeamStatsError, GetTeamStatsResponse, GetCategoriesError, GetCategoriesResponse, GetAdvancedSeasonStatsData, GetAdvancedSeasonStatsError, GetAdvancedSeasonStatsResponse, GetAdvancedGameStatsData, GetAdvancedGameStatsError, GetAdvancedGameStatsResponse, GetRecruitsData, GetRecruitsError, GetRecruitsResponse, GetTeamRecruitingRankingsData, GetTeamRecruitingRankingsError, GetTeamRecruitingRankingsResponse, GetAggregatedTeamRecruitingRatingsData, GetAggregatedTeamRecruitingRatingsError, GetAggregatedTeamRecruitingRatingsResponse, GetSpData, GetSpError, GetSpResponse, GetConferenceSpData, GetConferenceSpError, GetConferenceSpResponse, GetSrsData, GetSrsError, GetSrsResponse, GetEloData, GetEloError, GetEloResponse, GetFpiData, GetFpiError, GetFpiResponse, GetRankingsData, GetRankingsError, GetRankingsResponse, GetPlaysData, GetPlaysError, GetPlaysResponse, GetPlayTypesError, GetPlayTypesResponse, GetPlayStatsData, GetPlayStatsError, GetPlayStatsResponse, GetPlayStatTypesError, GetPlayStatTypesResponse, SearchPlayersData, SearchPlayersError, SearchPlayersResponse, GetPlayerUsageData, GetPlayerUsageError, GetPlayerUsageResponse, GetReturningProductionData, GetReturningProductionError, GetReturningProductionResponse, GetTransferPortalData, GetTransferPortalError, GetTransferPortalResponse, GetPredictedPointsData, GetPredictedPointsError, GetPredictedPointsResponse, GetPredictedPointsAddedByTeamData, GetPredictedPointsAddedByTeamError, GetPredictedPointsAddedByTeamResponse, GetPredictedPointsAddedByGameData, GetPredictedPointsAddedByGameError, GetPredictedPointsAddedByGameResponse, GetPredictedPointsAddedByPlayerGameData, GetPredictedPointsAddedByPlayerGameError, GetPredictedPointsAddedByPlayerGameResponse, GetPredictedPointsAddedByPlayerSeasonData, GetPredictedPointsAddedByPlayerSeasonError, GetPredictedPointsAddedByPlayerSeasonResponse, GetWinProbabilityData, GetWinProbabilityError, GetWinProbabilityResponse, GetPregameWinProbabilitiesData, GetPregameWinProbabilitiesError, GetPregameWinProbabilitiesResponse, GetFieldGoalExpectedPointsError, GetFieldGoalExpectedPointsResponse, GetLivePlaysData, GetLivePlaysError, GetLivePlaysResponse, GetLinesData, GetLinesError, GetLinesResponse, GetGamesData, GetGamesError, GetGamesResponse, GetGameTeamStatsData, GetGameTeamStatsError, GetGameTeamStatsResponse, GetGamePlayerStatsData, GetGamePlayerStatsError, GetGamePlayerStatsResponse, GetMediaData, GetMediaError, GetMediaResponse, GetWeatherData, GetWeatherError, GetWeatherResponse, GetRecordsData, GetRecordsError, GetRecordsResponse, GetCalendarData, GetCalendarError, GetCalendarResponse, GetScoreboardData, GetScoreboardError, GetScoreboardResponse, GetDrivesData, GetDrivesError, GetDrivesResponse, GetDraftTeamsError, GetDraftTeamsResponse, GetDraftPositionsError, GetDraftPositionsResponse, GetDraftPicksData, GetDraftPicksError, GetDraftPicksResponse, GetCoachesData, GetCoachesError, GetCoachesResponse, GetAdvancedBoxScoreData, GetAdvancedBoxScoreError, GetAdvancedBoxScoreResponse } from './types.gen';
5
+
6
+ export const client = createClient(createConfig({ baseUrl: 'https://apinext.collegefootballdata.com' }));
7
+
8
+ /**
9
+ * Retrieve opponent-adjusted team season statistics
10
+ */
11
+ export const getAdjustedTeamSeasonStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAdjustedTeamSeasonStatsData, ThrowOnError>) => {
12
+ return (options?.client ?? client).get<GetAdjustedTeamSeasonStatsResponse, GetAdjustedTeamSeasonStatsError, ThrowOnError>({
13
+ ...options,
14
+ url: '/wepa/team/season'
15
+ });
16
+ };
17
+
18
+ /**
19
+ * Retrieve opponent-adjusted player passing statistics
20
+ */
21
+ export const getAdjustedPlayerPassingStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAdjustedPlayerPassingStatsData, ThrowOnError>) => {
22
+ return (options?.client ?? client).get<GetAdjustedPlayerPassingStatsResponse, GetAdjustedPlayerPassingStatsError, ThrowOnError>({
23
+ ...options,
24
+ url: '/wepa/players/passing'
25
+ });
26
+ };
27
+
28
+ /**
29
+ * Retrieve opponent-adjusted player rushing statistics
30
+ */
31
+ export const getAdjustedPlayerRushingStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAdjustedPlayerRushingStatsData, ThrowOnError>) => {
32
+ return (options?.client ?? client).get<GetAdjustedPlayerRushingStatsResponse, GetAdjustedPlayerRushingStatsError, ThrowOnError>({
33
+ ...options,
34
+ url: '/wepa/players/rushing'
35
+ });
36
+ };
37
+
38
+ /**
39
+ * Retrieve Points Added Above Replacement (PAAR) ratings for kickers
40
+ */
41
+ export const getKickerPaar = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetKickerPaarData, ThrowOnError>) => {
42
+ return (options?.client ?? client).get<GetKickerPaarResponse, GetKickerPaarError, ThrowOnError>({
43
+ ...options,
44
+ url: '/wepa/players/kicking'
45
+ });
46
+ };
47
+
48
+ /**
49
+ * Retrieves team information
50
+ */
51
+ export const getTeams = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetTeamsData, ThrowOnError>) => {
52
+ return (options?.client ?? client).get<GetTeamsResponse, GetTeamsError, ThrowOnError>({
53
+ ...options,
54
+ url: '/teams'
55
+ });
56
+ };
57
+
58
+ /**
59
+ * Retrieves information on teams playing in the highest division of CFB
60
+ */
61
+ export const getFbsTeams = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetFbsTeamsData, ThrowOnError>) => {
62
+ return (options?.client ?? client).get<GetFbsTeamsResponse, GetFbsTeamsError, ThrowOnError>({
63
+ ...options,
64
+ url: '/teams/fbs'
65
+ });
66
+ };
67
+
68
+ /**
69
+ * Retrieves historical matchup details for two given teams
70
+ */
71
+ export const getMatchup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetMatchupData, ThrowOnError>) => {
72
+ return (options?.client ?? client).get<GetMatchupResponse, GetMatchupError, ThrowOnError>({
73
+ ...options,
74
+ url: '/teams/matchup'
75
+ });
76
+ };
77
+
78
+ /**
79
+ * Retrieves historical roster data
80
+ */
81
+ export const getRoster = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetRosterData, ThrowOnError>) => {
82
+ return (options?.client ?? client).get<GetRosterResponse, GetRosterError, ThrowOnError>({
83
+ ...options,
84
+ url: '/roster'
85
+ });
86
+ };
87
+
88
+ /**
89
+ * Retrieves list of conferences
90
+ */
91
+ export const getConferences = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
92
+ return (options?.client ?? client).get<GetConferencesResponse, GetConferencesError, ThrowOnError>({
93
+ ...options,
94
+ url: '/conferences'
95
+ });
96
+ };
97
+
98
+ /**
99
+ * Retrieve 247 Team Talent Composite for a given year
100
+ */
101
+ export const getTalent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTalentData, ThrowOnError>) => {
102
+ return (options?.client ?? client).get<GetTalentResponse, GetTalentError, ThrowOnError>({
103
+ ...options,
104
+ url: '/talent'
105
+ });
106
+ };
107
+
108
+ /**
109
+ * Retrieve list of venues
110
+ */
111
+ export const getVenues = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
112
+ return (options?.client ?? client).get<GetVenuesResponse, GetVenuesError, ThrowOnError>({
113
+ ...options,
114
+ url: '/venues'
115
+ });
116
+ };
117
+
118
+ /**
119
+ * Retrieves aggregated player statistics for a given season
120
+ */
121
+ export const getPlayerSeasonStats = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPlayerSeasonStatsData, ThrowOnError>) => {
122
+ return (options?.client ?? client).get<GetPlayerSeasonStatsResponse, GetPlayerSeasonStatsError, ThrowOnError>({
123
+ ...options,
124
+ url: '/stats/player/season'
125
+ });
126
+ };
127
+
128
+ /**
129
+ * Retrieves aggregated team season statistics
130
+ */
131
+ export const getTeamStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetTeamStatsData, ThrowOnError>) => {
132
+ return (options?.client ?? client).get<GetTeamStatsResponse, GetTeamStatsError, ThrowOnError>({
133
+ ...options,
134
+ url: '/stats/season'
135
+ });
136
+ };
137
+
138
+ /**
139
+ * Gets team statistical categories
140
+ */
141
+ export const getCategories = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
142
+ return (options?.client ?? client).get<GetCategoriesResponse, GetCategoriesError, ThrowOnError>({
143
+ ...options,
144
+ url: '/stats/categories'
145
+ });
146
+ };
147
+
148
+ /**
149
+ * Retrieves advanced season statistics for teams
150
+ */
151
+ export const getAdvancedSeasonStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAdvancedSeasonStatsData, ThrowOnError>) => {
152
+ return (options?.client ?? client).get<GetAdvancedSeasonStatsResponse, GetAdvancedSeasonStatsError, ThrowOnError>({
153
+ ...options,
154
+ url: '/stats/season/advanced'
155
+ });
156
+ };
157
+
158
+ /**
159
+ * Retrieves advanced statistics aggregated by game
160
+ */
161
+ export const getAdvancedGameStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAdvancedGameStatsData, ThrowOnError>) => {
162
+ return (options?.client ?? client).get<GetAdvancedGameStatsResponse, GetAdvancedGameStatsError, ThrowOnError>({
163
+ ...options,
164
+ url: '/stats/game/advanced'
165
+ });
166
+ };
167
+
168
+ /**
169
+ * Retrieves player recruiting rankings
170
+ */
171
+ export const getRecruits = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetRecruitsData, ThrowOnError>) => {
172
+ return (options?.client ?? client).get<GetRecruitsResponse, GetRecruitsError, ThrowOnError>({
173
+ ...options,
174
+ url: '/recruiting/players'
175
+ });
176
+ };
177
+
178
+ /**
179
+ * Retrieves team recruiting rankings
180
+ */
181
+ export const getTeamRecruitingRankings = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetTeamRecruitingRankingsData, ThrowOnError>) => {
182
+ return (options?.client ?? client).get<GetTeamRecruitingRankingsResponse, GetTeamRecruitingRankingsError, ThrowOnError>({
183
+ ...options,
184
+ url: '/recruiting/teams'
185
+ });
186
+ };
187
+
188
+ /**
189
+ * Retrieves aggregated recruiting statistics by team and position grouping
190
+ */
191
+ export const getAggregatedTeamRecruitingRatings = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAggregatedTeamRecruitingRatingsData, ThrowOnError>) => {
192
+ return (options?.client ?? client).get<GetAggregatedTeamRecruitingRatingsResponse, GetAggregatedTeamRecruitingRatingsError, ThrowOnError>({
193
+ ...options,
194
+ url: '/recruiting/groups'
195
+ });
196
+ };
197
+
198
+ /**
199
+ * Retrieves SP+ ratings for a given year or school
200
+ */
201
+ export const getSp = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetSpData, ThrowOnError>) => {
202
+ return (options?.client ?? client).get<GetSpResponse, GetSpError, ThrowOnError>({
203
+ ...options,
204
+ url: '/ratings/sp'
205
+ });
206
+ };
207
+
208
+ /**
209
+ * Retrieves aggregated historical conference SP+ data
210
+ */
211
+ export const getConferenceSp = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetConferenceSpData, ThrowOnError>) => {
212
+ return (options?.client ?? client).get<GetConferenceSpResponse, GetConferenceSpError, ThrowOnError>({
213
+ ...options,
214
+ url: '/ratings/sp/conferences'
215
+ });
216
+ };
217
+
218
+ /**
219
+ * Retrieves historical SRS for a year or team
220
+ */
221
+ export const getSrs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetSrsData, ThrowOnError>) => {
222
+ return (options?.client ?? client).get<GetSrsResponse, GetSrsError, ThrowOnError>({
223
+ ...options,
224
+ url: '/ratings/srs'
225
+ });
226
+ };
227
+
228
+ /**
229
+ * Retrieves historical Elo ratings
230
+ */
231
+ export const getElo = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetEloData, ThrowOnError>) => {
232
+ return (options?.client ?? client).get<GetEloResponse, GetEloError, ThrowOnError>({
233
+ ...options,
234
+ url: '/ratings/elo'
235
+ });
236
+ };
237
+
238
+ /**
239
+ * Retrieves historical Football Power Index (FPI) ratings
240
+ */
241
+ export const getFpi = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetFpiData, ThrowOnError>) => {
242
+ return (options?.client ?? client).get<GetFpiResponse, GetFpiError, ThrowOnError>({
243
+ ...options,
244
+ url: '/ratings/fpi'
245
+ });
246
+ };
247
+
248
+ /**
249
+ * Retrieves historical poll data
250
+ */
251
+ export const getRankings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRankingsData, ThrowOnError>) => {
252
+ return (options?.client ?? client).get<GetRankingsResponse, GetRankingsError, ThrowOnError>({
253
+ ...options,
254
+ url: '/rankings'
255
+ });
256
+ };
257
+
258
+ /**
259
+ * Retrieves historical play data
260
+ */
261
+ export const getPlays = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPlaysData, ThrowOnError>) => {
262
+ return (options?.client ?? client).get<GetPlaysResponse, GetPlaysError, ThrowOnError>({
263
+ ...options,
264
+ url: '/plays'
265
+ });
266
+ };
267
+
268
+ /**
269
+ * Retrieves available play types
270
+ */
271
+ export const getPlayTypes = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
272
+ return (options?.client ?? client).get<GetPlayTypesResponse, GetPlayTypesError, ThrowOnError>({
273
+ ...options,
274
+ url: '/plays/types'
275
+ });
276
+ };
277
+
278
+ /**
279
+ * Retrieve player-play associations (limit 2000)
280
+ */
281
+ export const getPlayStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPlayStatsData, ThrowOnError>) => {
282
+ return (options?.client ?? client).get<GetPlayStatsResponse, GetPlayStatsError, ThrowOnError>({
283
+ ...options,
284
+ url: '/plays/stats'
285
+ });
286
+ };
287
+
288
+ /**
289
+ * Retrieves available play stat types
290
+ */
291
+ export const getPlayStatTypes = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
292
+ return (options?.client ?? client).get<GetPlayStatTypesResponse, GetPlayStatTypesError, ThrowOnError>({
293
+ ...options,
294
+ url: '/plays/stats/types'
295
+ });
296
+ };
297
+
298
+ /**
299
+ * Search for players (lists top 100 results)
300
+ */
301
+ export const searchPlayers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SearchPlayersData, ThrowOnError>) => {
302
+ return (options?.client ?? client).get<SearchPlayersResponse, SearchPlayersError, ThrowOnError>({
303
+ ...options,
304
+ url: '/player/search'
305
+ });
306
+ };
307
+
308
+ /**
309
+ * Retrieves player usage data for a given season
310
+ */
311
+ export const getPlayerUsage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPlayerUsageData, ThrowOnError>) => {
312
+ return (options?.client ?? client).get<GetPlayerUsageResponse, GetPlayerUsageError, ThrowOnError>({
313
+ ...options,
314
+ url: '/player/usage'
315
+ });
316
+ };
317
+
318
+ /**
319
+ * Retrieves returning production data. Either a year or team filter must be specified.
320
+ */
321
+ export const getReturningProduction = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetReturningProductionData, ThrowOnError>) => {
322
+ return (options?.client ?? client).get<GetReturningProductionResponse, GetReturningProductionError, ThrowOnError>({
323
+ ...options,
324
+ url: '/player/returning'
325
+ });
326
+ };
327
+
328
+ /**
329
+ * Retrieves transfer portal data for a given year
330
+ */
331
+ export const getTransferPortal = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTransferPortalData, ThrowOnError>) => {
332
+ return (options?.client ?? client).get<GetTransferPortalResponse, GetTransferPortalError, ThrowOnError>({
333
+ ...options,
334
+ url: '/player/portal'
335
+ });
336
+ };
337
+
338
+ /**
339
+ * Query Predicted Points values by down and distance
340
+ */
341
+ export const getPredictedPoints = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPredictedPointsData, ThrowOnError>) => {
342
+ return (options?.client ?? client).get<GetPredictedPointsResponse, GetPredictedPointsError, ThrowOnError>({
343
+ ...options,
344
+ url: '/ppa/predicted'
345
+ });
346
+ };
347
+
348
+ /**
349
+ * Retrieves historical team PPA metrics by season
350
+ */
351
+ export const getPredictedPointsAddedByTeam = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPredictedPointsAddedByTeamData, ThrowOnError>) => {
352
+ return (options?.client ?? client).get<GetPredictedPointsAddedByTeamResponse, GetPredictedPointsAddedByTeamError, ThrowOnError>({
353
+ ...options,
354
+ url: '/ppa/teams'
355
+ });
356
+ };
357
+
358
+ /**
359
+ * Retrieves historical team PPA metrics by game
360
+ */
361
+ export const getPredictedPointsAddedByGame = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPredictedPointsAddedByGameData, ThrowOnError>) => {
362
+ return (options?.client ?? client).get<GetPredictedPointsAddedByGameResponse, GetPredictedPointsAddedByGameError, ThrowOnError>({
363
+ ...options,
364
+ url: '/ppa/games'
365
+ });
366
+ };
367
+
368
+ /**
369
+ * Queries player PPA statistics by game
370
+ */
371
+ export const getPredictedPointsAddedByPlayerGame = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPredictedPointsAddedByPlayerGameData, ThrowOnError>) => {
372
+ return (options?.client ?? client).get<GetPredictedPointsAddedByPlayerGameResponse, GetPredictedPointsAddedByPlayerGameError, ThrowOnError>({
373
+ ...options,
374
+ url: '/ppa/players/games'
375
+ });
376
+ };
377
+
378
+ /**
379
+ * Queries player PPA statistics by season
380
+ */
381
+ export const getPredictedPointsAddedByPlayerSeason = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPredictedPointsAddedByPlayerSeasonData, ThrowOnError>) => {
382
+ return (options?.client ?? client).get<GetPredictedPointsAddedByPlayerSeasonResponse, GetPredictedPointsAddedByPlayerSeasonError, ThrowOnError>({
383
+ ...options,
384
+ url: '/ppa/players/season'
385
+ });
386
+ };
387
+
388
+ /**
389
+ * Query play win probabilities by game
390
+ */
391
+ export const getWinProbability = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWinProbabilityData, ThrowOnError>) => {
392
+ return (options?.client ?? client).get<GetWinProbabilityResponse, GetWinProbabilityError, ThrowOnError>({
393
+ ...options,
394
+ url: '/metrics/wp'
395
+ });
396
+ };
397
+
398
+ /**
399
+ * Queries pregame win probabilities
400
+ */
401
+ export const getPregameWinProbabilities = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPregameWinProbabilitiesData, ThrowOnError>) => {
402
+ return (options?.client ?? client).get<GetPregameWinProbabilitiesResponse, GetPregameWinProbabilitiesError, ThrowOnError>({
403
+ ...options,
404
+ url: '/metrics/wp/pregame'
405
+ });
406
+ };
407
+
408
+ /**
409
+ * Queries field goal expected points values
410
+ */
411
+ export const getFieldGoalExpectedPoints = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
412
+ return (options?.client ?? client).get<GetFieldGoalExpectedPointsResponse, GetFieldGoalExpectedPointsError, ThrowOnError>({
413
+ ...options,
414
+ url: '/metrics/fg/ep'
415
+ });
416
+ };
417
+
418
+ /**
419
+ * Queries live play-by-play data and advanced stats
420
+ */
421
+ export const getLivePlays = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLivePlaysData, ThrowOnError>) => {
422
+ return (options?.client ?? client).get<GetLivePlaysResponse, GetLivePlaysError, ThrowOnError>({
423
+ ...options,
424
+ url: '/live/plays'
425
+ });
426
+ };
427
+
428
+ /**
429
+ * Retrieves historical betting data
430
+ */
431
+ export const getLines = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetLinesData, ThrowOnError>) => {
432
+ return (options?.client ?? client).get<GetLinesResponse, GetLinesError, ThrowOnError>({
433
+ ...options,
434
+ url: '/lines'
435
+ });
436
+ };
437
+
438
+ /**
439
+ * Retrieves historical game data
440
+ */
441
+ export const getGames = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetGamesData, ThrowOnError>) => {
442
+ return (options?.client ?? client).get<GetGamesResponse, GetGamesError, ThrowOnError>({
443
+ ...options,
444
+ url: '/games'
445
+ });
446
+ };
447
+
448
+ /**
449
+ * Retrieves team box score statistics
450
+ */
451
+ export const getGameTeamStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetGameTeamStatsData, ThrowOnError>) => {
452
+ return (options?.client ?? client).get<GetGameTeamStatsResponse, GetGameTeamStatsError, ThrowOnError>({
453
+ ...options,
454
+ url: '/games/teams'
455
+ });
456
+ };
457
+
458
+ /**
459
+ * Retrieves player box score statistics
460
+ */
461
+ export const getGamePlayerStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetGamePlayerStatsData, ThrowOnError>) => {
462
+ return (options?.client ?? client).get<GetGamePlayerStatsResponse, GetGamePlayerStatsError, ThrowOnError>({
463
+ ...options,
464
+ url: '/games/players'
465
+ });
466
+ };
467
+
468
+ /**
469
+ * Retrieves media information for games
470
+ */
471
+ export const getMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetMediaData, ThrowOnError>) => {
472
+ return (options?.client ?? client).get<GetMediaResponse, GetMediaError, ThrowOnError>({
473
+ ...options,
474
+ url: '/games/media'
475
+ });
476
+ };
477
+
478
+ /**
479
+ * Retrieve historical and future weather data (Patreon only)
480
+ */
481
+ export const getWeather = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetWeatherData, ThrowOnError>) => {
482
+ return (options?.client ?? client).get<GetWeatherResponse, GetWeatherError, ThrowOnError>({
483
+ ...options,
484
+ url: '/games/weather'
485
+ });
486
+ };
487
+
488
+ /**
489
+ * Retrieves historical team records
490
+ */
491
+ export const getRecords = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetRecordsData, ThrowOnError>) => {
492
+ return (options?.client ?? client).get<GetRecordsResponse, GetRecordsError, ThrowOnError>({
493
+ ...options,
494
+ url: '/records'
495
+ });
496
+ };
497
+
498
+ /**
499
+ * Retrieves calendar information
500
+ */
501
+ export const getCalendar = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetCalendarData, ThrowOnError>) => {
502
+ return (options?.client ?? client).get<GetCalendarResponse, GetCalendarError, ThrowOnError>({
503
+ ...options,
504
+ url: '/calendar'
505
+ });
506
+ };
507
+
508
+ /**
509
+ * Retrieves live scoreboard data
510
+ */
511
+ export const getScoreboard = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetScoreboardData, ThrowOnError>) => {
512
+ return (options?.client ?? client).get<GetScoreboardResponse, GetScoreboardError, ThrowOnError>({
513
+ ...options,
514
+ url: '/scoreboard'
515
+ });
516
+ };
517
+
518
+ /**
519
+ * Retrieves historical drive data
520
+ */
521
+ export const getDrives = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetDrivesData, ThrowOnError>) => {
522
+ return (options?.client ?? client).get<GetDrivesResponse, GetDrivesError, ThrowOnError>({
523
+ ...options,
524
+ url: '/drives'
525
+ });
526
+ };
527
+
528
+ /**
529
+ * Retrieves list of NFL teams
530
+ */
531
+ export const getDraftTeams = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
532
+ return (options?.client ?? client).get<GetDraftTeamsResponse, GetDraftTeamsError, ThrowOnError>({
533
+ ...options,
534
+ url: '/draft/teams'
535
+ });
536
+ };
537
+
538
+ /**
539
+ * Retrieves list of player position categories for the NFL Draft
540
+ */
541
+ export const getDraftPositions = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
542
+ return (options?.client ?? client).get<GetDraftPositionsResponse, GetDraftPositionsError, ThrowOnError>({
543
+ ...options,
544
+ url: '/draft/positions'
545
+ });
546
+ };
547
+
548
+ /**
549
+ * Retrieve historical NFL draft data
550
+ */
551
+ export const getDraftPicks = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetDraftPicksData, ThrowOnError>) => {
552
+ return (options?.client ?? client).get<GetDraftPicksResponse, GetDraftPicksError, ThrowOnError>({
553
+ ...options,
554
+ url: '/draft/picks'
555
+ });
556
+ };
557
+
558
+ /**
559
+ * Retrieves historical head coach information and records
560
+ */
561
+ export const getCoaches = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetCoachesData, ThrowOnError>) => {
562
+ return (options?.client ?? client).get<GetCoachesResponse, GetCoachesError, ThrowOnError>({
563
+ ...options,
564
+ url: '/coaches'
565
+ });
566
+ };
567
+
568
+ /**
569
+ * Retrieves an advanced box score for a game
570
+ */
571
+ export const getAdvancedBoxScore = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdvancedBoxScoreData, ThrowOnError>) => {
572
+ return (options?.client ?? client).get<GetAdvancedBoxScoreResponse, GetAdvancedBoxScoreError, ThrowOnError>({
573
+ ...options,
574
+ url: '/game/box/advanced'
575
+ });
576
+ };