cbbd 1.1.0a1__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. cbbd/__init__.py +64 -0
  2. cbbd/api/__init__.py +10 -0
  3. cbbd/api/conferences_api.py +176 -0
  4. cbbd/api/games_api.py +806 -0
  5. cbbd/api/plays_api.py +761 -0
  6. cbbd/api/stats_api.py +423 -0
  7. cbbd/api/teams_api.py +195 -0
  8. cbbd/api/venues_api.py +176 -0
  9. cbbd/api_client.py +767 -0
  10. cbbd/api_response.py +25 -0
  11. cbbd/configuration.py +443 -0
  12. cbbd/exceptions.py +167 -0
  13. cbbd/models/__init__.py +42 -0
  14. cbbd/models/conference_info.py +80 -0
  15. cbbd/models/game_box_score_players.py +147 -0
  16. cbbd/models/game_box_score_players_players_inner.py +238 -0
  17. cbbd/models/game_box_score_team.py +148 -0
  18. cbbd/models/game_box_score_team_stats.py +170 -0
  19. cbbd/models/game_box_score_team_stats_points.py +112 -0
  20. cbbd/models/game_info.py +212 -0
  21. cbbd/models/game_media_info.py +133 -0
  22. cbbd/models/game_media_info_broadcasts_inner.py +74 -0
  23. cbbd/models/game_status.py +44 -0
  24. cbbd/models/play_info.py +193 -0
  25. cbbd/models/play_info_participants_inner.py +74 -0
  26. cbbd/models/play_type_info.py +74 -0
  27. cbbd/models/player_season_stats.py +231 -0
  28. cbbd/models/season_type.py +42 -0
  29. cbbd/models/team_info.py +160 -0
  30. cbbd/models/team_season_stats.py +112 -0
  31. cbbd/models/team_season_unit_stats.py +163 -0
  32. cbbd/models/team_season_unit_stats_field_goals.py +91 -0
  33. cbbd/models/team_season_unit_stats_fouls.py +91 -0
  34. cbbd/models/team_season_unit_stats_four_factors.py +98 -0
  35. cbbd/models/team_season_unit_stats_points.py +98 -0
  36. cbbd/models/team_season_unit_stats_rebounds.py +91 -0
  37. cbbd/models/team_season_unit_stats_turnovers.py +84 -0
  38. cbbd/models/venue_info.py +102 -0
  39. cbbd/py.typed +0 -0
  40. cbbd/rest.py +330 -0
  41. cbbd-1.1.0a1.dist-info/METADATA +24 -0
  42. cbbd-1.1.0a1.dist-info/RECORD +44 -0
  43. cbbd-1.1.0a1.dist-info/WHEEL +5 -0
  44. cbbd-1.1.0a1.dist-info/top_level.txt +1 -0
cbbd/api/games_api.py ADDED
@@ -0,0 +1,806 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ College Basketball Data API
5
+
6
+ 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.
7
+
8
+ The version of the OpenAPI document: 1.1.0
9
+ Contact: admin@collegefootballdata.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ import re # noqa: F401
17
+ import io
18
+ import warnings
19
+
20
+ from pydantic import validate_arguments, ValidationError
21
+
22
+ from typing_extensions import Annotated
23
+ from datetime import datetime
24
+
25
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr
26
+
27
+ from typing import List, Optional, Union
28
+
29
+ from cbbd.models.game_box_score_players import GameBoxScorePlayers
30
+ from cbbd.models.game_box_score_team import GameBoxScoreTeam
31
+ from cbbd.models.game_info import GameInfo
32
+ from cbbd.models.game_media_info import GameMediaInfo
33
+ from cbbd.models.game_status import GameStatus
34
+ from cbbd.models.season_type import SeasonType
35
+
36
+ from cbbd.api_client import ApiClient
37
+ from cbbd.api_response import ApiResponse
38
+ from cbbd.exceptions import ( # noqa: F401
39
+ ApiTypeError,
40
+ ApiValueError
41
+ )
42
+
43
+
44
+ class GamesApi:
45
+ """NOTE: This class is auto generated by OpenAPI Generator
46
+ Ref: https://openapi-generator.tech
47
+
48
+ Do not edit the class manually.
49
+ """
50
+
51
+ def __init__(self, api_client=None) -> None:
52
+ if api_client is None:
53
+ api_client = ApiClient.get_default()
54
+ self.api_client = api_client
55
+
56
+ @validate_arguments
57
+ def get_broadcasts(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, **kwargs) -> List[GameMediaInfo]: # noqa: E501
58
+ """get_broadcasts # noqa: E501
59
+
60
+ Returns broadcast information on the first 3000 games that match the provided filters, ordered by start date. # noqa: E501
61
+ This method makes a synchronous HTTP request by default. To make an
62
+ asynchronous HTTP request, please pass async_req=True
63
+
64
+ >>> thread = api.get_broadcasts(start_date_range, end_date_range, team, conference, season, season_type, async_req=True)
65
+ >>> result = thread.get()
66
+
67
+ :param start_date_range: Optional start timestamp in ISO 8601 format
68
+ :type start_date_range: datetime
69
+ :param end_date_range: Optional end timestamp in ISO 8601 format
70
+ :type end_date_range: datetime
71
+ :param team: Optional team name filter
72
+ :type team: str
73
+ :param conference: Optional conference abbreviation filter
74
+ :type conference: str
75
+ :param season: Optional season filter
76
+ :type season: float
77
+ :param season_type: Optional season type filter
78
+ :type season_type: SeasonType
79
+ :param async_req: Whether to execute the request asynchronously.
80
+ :type async_req: bool, optional
81
+ :param _request_timeout: timeout setting for this request.
82
+ If one number provided, it will be total request
83
+ timeout. It can also be a pair (tuple) of
84
+ (connection, read) timeouts.
85
+ :return: Returns the result object.
86
+ If the method is called asynchronously,
87
+ returns the request thread.
88
+ :rtype: List[GameMediaInfo]
89
+ """
90
+ kwargs['_return_http_data_only'] = True
91
+ if '_preload_content' in kwargs:
92
+ message = "Error! Please call the get_broadcasts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
93
+ raise ValueError(message)
94
+ return self.get_broadcasts_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, **kwargs) # noqa: E501
95
+
96
+ @validate_arguments
97
+ def get_broadcasts_with_http_info(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
98
+ """get_broadcasts # noqa: E501
99
+
100
+ Returns broadcast information on the first 3000 games that match the provided filters, ordered by start date. # noqa: E501
101
+ This method makes a synchronous HTTP request by default. To make an
102
+ asynchronous HTTP request, please pass async_req=True
103
+
104
+ >>> thread = api.get_broadcasts_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, async_req=True)
105
+ >>> result = thread.get()
106
+
107
+ :param start_date_range: Optional start timestamp in ISO 8601 format
108
+ :type start_date_range: datetime
109
+ :param end_date_range: Optional end timestamp in ISO 8601 format
110
+ :type end_date_range: datetime
111
+ :param team: Optional team name filter
112
+ :type team: str
113
+ :param conference: Optional conference abbreviation filter
114
+ :type conference: str
115
+ :param season: Optional season filter
116
+ :type season: float
117
+ :param season_type: Optional season type filter
118
+ :type season_type: SeasonType
119
+ :param async_req: Whether to execute the request asynchronously.
120
+ :type async_req: bool, optional
121
+ :param _preload_content: if False, the ApiResponse.data will
122
+ be set to none and raw_data will store the
123
+ HTTP response body without reading/decoding.
124
+ Default is True.
125
+ :type _preload_content: bool, optional
126
+ :param _return_http_data_only: response data instead of ApiResponse
127
+ object with status code, headers, etc
128
+ :type _return_http_data_only: bool, optional
129
+ :param _request_timeout: timeout setting for this request. If one
130
+ number provided, it will be total request
131
+ timeout. It can also be a pair (tuple) of
132
+ (connection, read) timeouts.
133
+ :param _request_auth: set to override the auth_settings for an a single
134
+ request; this effectively ignores the authentication
135
+ in the spec for a single request.
136
+ :type _request_auth: dict, optional
137
+ :type _content_type: string, optional: force content-type for the request
138
+ :return: Returns the result object.
139
+ If the method is called asynchronously,
140
+ returns the request thread.
141
+ :rtype: tuple(List[GameMediaInfo], status_code(int), headers(HTTPHeaderDict))
142
+ """
143
+
144
+ _params = locals()
145
+
146
+ _all_params = [
147
+ 'start_date_range',
148
+ 'end_date_range',
149
+ 'team',
150
+ 'conference',
151
+ 'season',
152
+ 'season_type'
153
+ ]
154
+ _all_params.extend(
155
+ [
156
+ 'async_req',
157
+ '_return_http_data_only',
158
+ '_preload_content',
159
+ '_request_timeout',
160
+ '_request_auth',
161
+ '_content_type',
162
+ '_headers'
163
+ ]
164
+ )
165
+
166
+ # validate the arguments
167
+ for _key, _val in _params['kwargs'].items():
168
+ if _key not in _all_params:
169
+ raise ApiTypeError(
170
+ "Got an unexpected keyword argument '%s'"
171
+ " to method get_broadcasts" % _key
172
+ )
173
+ _params[_key] = _val
174
+ del _params['kwargs']
175
+
176
+ _collection_formats = {}
177
+
178
+ # process the path parameters
179
+ _path_params = {}
180
+
181
+ # process the query parameters
182
+ _query_params = []
183
+ if _params.get('start_date_range') is not None: # noqa: E501
184
+ if isinstance(_params['start_date_range'], datetime):
185
+ _query_params.append(('startDateRange', _params['start_date_range'].strftime(self.api_client.configuration.datetime_format)))
186
+ else:
187
+ _query_params.append(('startDateRange', _params['start_date_range']))
188
+
189
+ if _params.get('end_date_range') is not None: # noqa: E501
190
+ if isinstance(_params['end_date_range'], datetime):
191
+ _query_params.append(('endDateRange', _params['end_date_range'].strftime(self.api_client.configuration.datetime_format)))
192
+ else:
193
+ _query_params.append(('endDateRange', _params['end_date_range']))
194
+
195
+ if _params.get('team') is not None: # noqa: E501
196
+ _query_params.append(('team', _params['team']))
197
+
198
+ if _params.get('conference') is not None: # noqa: E501
199
+ _query_params.append(('conference', _params['conference']))
200
+
201
+ if _params.get('season') is not None: # noqa: E501
202
+ _query_params.append(('season', _params['season']))
203
+
204
+ if _params.get('season_type') is not None: # noqa: E501
205
+ _query_params.append(('seasonType', _params['season_type'].value))
206
+
207
+ # process the header parameters
208
+ _header_params = dict(_params.get('_headers', {}))
209
+ # process the form parameters
210
+ _form_params = []
211
+ _files = {}
212
+ # process the body parameter
213
+ _body_params = None
214
+ # set the HTTP header `Accept`
215
+ _header_params['Accept'] = self.api_client.select_header_accept(
216
+ ['application/json']) # noqa: E501
217
+
218
+ # authentication setting
219
+ _auth_settings = ['apiKey'] # noqa: E501
220
+
221
+ _response_types_map = {
222
+ '200': "List[GameMediaInfo]",
223
+ }
224
+
225
+ return self.api_client.call_api(
226
+ '/games/media', 'GET',
227
+ _path_params,
228
+ _query_params,
229
+ _header_params,
230
+ body=_body_params,
231
+ post_params=_form_params,
232
+ files=_files,
233
+ response_types_map=_response_types_map,
234
+ auth_settings=_auth_settings,
235
+ async_req=_params.get('async_req'),
236
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
237
+ _preload_content=_params.get('_preload_content', True),
238
+ _request_timeout=_params.get('_request_timeout'),
239
+ collection_formats=_collection_formats,
240
+ _request_auth=_params.get('_request_auth'))
241
+
242
+ @validate_arguments
243
+ def get_game_players(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, **kwargs) -> List[GameBoxScorePlayers]: # noqa: E501
244
+ """get_game_players # noqa: E501
245
+
246
+ Returns player box score statistics and metrics on the first 1000 games that match the provided filters, ordered by start date. # noqa: E501
247
+ This method makes a synchronous HTTP request by default. To make an
248
+ asynchronous HTTP request, please pass async_req=True
249
+
250
+ >>> thread = api.get_game_players(start_date_range, end_date_range, team, conference, season, season_type, async_req=True)
251
+ >>> result = thread.get()
252
+
253
+ :param start_date_range: Optional start timestamp in ISO 8601 format
254
+ :type start_date_range: datetime
255
+ :param end_date_range: Optional end timestamp in ISO 8601 format
256
+ :type end_date_range: datetime
257
+ :param team: Optional team name filter
258
+ :type team: str
259
+ :param conference: Optional conference abbreviation filter
260
+ :type conference: str
261
+ :param season: Optional season filter
262
+ :type season: float
263
+ :param season_type: Optional season type filter
264
+ :type season_type: SeasonType
265
+ :param async_req: Whether to execute the request asynchronously.
266
+ :type async_req: bool, optional
267
+ :param _request_timeout: timeout setting for this request.
268
+ If one number provided, it will be total request
269
+ timeout. It can also be a pair (tuple) of
270
+ (connection, read) timeouts.
271
+ :return: Returns the result object.
272
+ If the method is called asynchronously,
273
+ returns the request thread.
274
+ :rtype: List[GameBoxScorePlayers]
275
+ """
276
+ kwargs['_return_http_data_only'] = True
277
+ if '_preload_content' in kwargs:
278
+ message = "Error! Please call the get_game_players_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
279
+ raise ValueError(message)
280
+ return self.get_game_players_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, **kwargs) # noqa: E501
281
+
282
+ @validate_arguments
283
+ def get_game_players_with_http_info(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
284
+ """get_game_players # noqa: E501
285
+
286
+ Returns player box score statistics and metrics on the first 1000 games that match the provided filters, ordered by start date. # noqa: E501
287
+ This method makes a synchronous HTTP request by default. To make an
288
+ asynchronous HTTP request, please pass async_req=True
289
+
290
+ >>> thread = api.get_game_players_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, async_req=True)
291
+ >>> result = thread.get()
292
+
293
+ :param start_date_range: Optional start timestamp in ISO 8601 format
294
+ :type start_date_range: datetime
295
+ :param end_date_range: Optional end timestamp in ISO 8601 format
296
+ :type end_date_range: datetime
297
+ :param team: Optional team name filter
298
+ :type team: str
299
+ :param conference: Optional conference abbreviation filter
300
+ :type conference: str
301
+ :param season: Optional season filter
302
+ :type season: float
303
+ :param season_type: Optional season type filter
304
+ :type season_type: SeasonType
305
+ :param async_req: Whether to execute the request asynchronously.
306
+ :type async_req: bool, optional
307
+ :param _preload_content: if False, the ApiResponse.data will
308
+ be set to none and raw_data will store the
309
+ HTTP response body without reading/decoding.
310
+ Default is True.
311
+ :type _preload_content: bool, optional
312
+ :param _return_http_data_only: response data instead of ApiResponse
313
+ object with status code, headers, etc
314
+ :type _return_http_data_only: bool, optional
315
+ :param _request_timeout: timeout setting for this request. If one
316
+ number provided, it will be total request
317
+ timeout. It can also be a pair (tuple) of
318
+ (connection, read) timeouts.
319
+ :param _request_auth: set to override the auth_settings for an a single
320
+ request; this effectively ignores the authentication
321
+ in the spec for a single request.
322
+ :type _request_auth: dict, optional
323
+ :type _content_type: string, optional: force content-type for the request
324
+ :return: Returns the result object.
325
+ If the method is called asynchronously,
326
+ returns the request thread.
327
+ :rtype: tuple(List[GameBoxScorePlayers], status_code(int), headers(HTTPHeaderDict))
328
+ """
329
+
330
+ _params = locals()
331
+
332
+ _all_params = [
333
+ 'start_date_range',
334
+ 'end_date_range',
335
+ 'team',
336
+ 'conference',
337
+ 'season',
338
+ 'season_type'
339
+ ]
340
+ _all_params.extend(
341
+ [
342
+ 'async_req',
343
+ '_return_http_data_only',
344
+ '_preload_content',
345
+ '_request_timeout',
346
+ '_request_auth',
347
+ '_content_type',
348
+ '_headers'
349
+ ]
350
+ )
351
+
352
+ # validate the arguments
353
+ for _key, _val in _params['kwargs'].items():
354
+ if _key not in _all_params:
355
+ raise ApiTypeError(
356
+ "Got an unexpected keyword argument '%s'"
357
+ " to method get_game_players" % _key
358
+ )
359
+ _params[_key] = _val
360
+ del _params['kwargs']
361
+
362
+ _collection_formats = {}
363
+
364
+ # process the path parameters
365
+ _path_params = {}
366
+
367
+ # process the query parameters
368
+ _query_params = []
369
+ if _params.get('start_date_range') is not None: # noqa: E501
370
+ if isinstance(_params['start_date_range'], datetime):
371
+ _query_params.append(('startDateRange', _params['start_date_range'].strftime(self.api_client.configuration.datetime_format)))
372
+ else:
373
+ _query_params.append(('startDateRange', _params['start_date_range']))
374
+
375
+ if _params.get('end_date_range') is not None: # noqa: E501
376
+ if isinstance(_params['end_date_range'], datetime):
377
+ _query_params.append(('endDateRange', _params['end_date_range'].strftime(self.api_client.configuration.datetime_format)))
378
+ else:
379
+ _query_params.append(('endDateRange', _params['end_date_range']))
380
+
381
+ if _params.get('team') is not None: # noqa: E501
382
+ _query_params.append(('team', _params['team']))
383
+
384
+ if _params.get('conference') is not None: # noqa: E501
385
+ _query_params.append(('conference', _params['conference']))
386
+
387
+ if _params.get('season') is not None: # noqa: E501
388
+ _query_params.append(('season', _params['season']))
389
+
390
+ if _params.get('season_type') is not None: # noqa: E501
391
+ _query_params.append(('seasonType', _params['season_type'].value))
392
+
393
+ # process the header parameters
394
+ _header_params = dict(_params.get('_headers', {}))
395
+ # process the form parameters
396
+ _form_params = []
397
+ _files = {}
398
+ # process the body parameter
399
+ _body_params = None
400
+ # set the HTTP header `Accept`
401
+ _header_params['Accept'] = self.api_client.select_header_accept(
402
+ ['application/json']) # noqa: E501
403
+
404
+ # authentication setting
405
+ _auth_settings = ['apiKey'] # noqa: E501
406
+
407
+ _response_types_map = {
408
+ '200': "List[GameBoxScorePlayers]",
409
+ }
410
+
411
+ return self.api_client.call_api(
412
+ '/games/players', 'GET',
413
+ _path_params,
414
+ _query_params,
415
+ _header_params,
416
+ body=_body_params,
417
+ post_params=_form_params,
418
+ files=_files,
419
+ response_types_map=_response_types_map,
420
+ auth_settings=_auth_settings,
421
+ async_req=_params.get('async_req'),
422
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
423
+ _preload_content=_params.get('_preload_content', True),
424
+ _request_timeout=_params.get('_request_timeout'),
425
+ collection_formats=_collection_formats,
426
+ _request_auth=_params.get('_request_auth'))
427
+
428
+ @validate_arguments
429
+ def get_game_teams(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, **kwargs) -> List[GameBoxScoreTeam]: # noqa: E501
430
+ """get_game_teams # noqa: E501
431
+
432
+ Returns team box score statistics and metrics on the first 3000 games that match the provided filters, ordered by start date. # noqa: E501
433
+ This method makes a synchronous HTTP request by default. To make an
434
+ asynchronous HTTP request, please pass async_req=True
435
+
436
+ >>> thread = api.get_game_teams(start_date_range, end_date_range, team, conference, season, season_type, async_req=True)
437
+ >>> result = thread.get()
438
+
439
+ :param start_date_range: Optional start timestamp in ISO 8601 format
440
+ :type start_date_range: datetime
441
+ :param end_date_range: Optional end timestamp in ISO 8601 format
442
+ :type end_date_range: datetime
443
+ :param team: Optional team name filter
444
+ :type team: str
445
+ :param conference: Optional conference abbreviation filter
446
+ :type conference: str
447
+ :param season: Optional season filter
448
+ :type season: float
449
+ :param season_type: Optional season type filter
450
+ :type season_type: SeasonType
451
+ :param async_req: Whether to execute the request asynchronously.
452
+ :type async_req: bool, optional
453
+ :param _request_timeout: timeout setting for this request.
454
+ If one number provided, it will be total request
455
+ timeout. It can also be a pair (tuple) of
456
+ (connection, read) timeouts.
457
+ :return: Returns the result object.
458
+ If the method is called asynchronously,
459
+ returns the request thread.
460
+ :rtype: List[GameBoxScoreTeam]
461
+ """
462
+ kwargs['_return_http_data_only'] = True
463
+ if '_preload_content' in kwargs:
464
+ message = "Error! Please call the get_game_teams_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
465
+ raise ValueError(message)
466
+ return self.get_game_teams_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, **kwargs) # noqa: E501
467
+
468
+ @validate_arguments
469
+ def get_game_teams_with_http_info(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
470
+ """get_game_teams # noqa: E501
471
+
472
+ Returns team box score statistics and metrics on the first 3000 games that match the provided filters, ordered by start date. # noqa: E501
473
+ This method makes a synchronous HTTP request by default. To make an
474
+ asynchronous HTTP request, please pass async_req=True
475
+
476
+ >>> thread = api.get_game_teams_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, async_req=True)
477
+ >>> result = thread.get()
478
+
479
+ :param start_date_range: Optional start timestamp in ISO 8601 format
480
+ :type start_date_range: datetime
481
+ :param end_date_range: Optional end timestamp in ISO 8601 format
482
+ :type end_date_range: datetime
483
+ :param team: Optional team name filter
484
+ :type team: str
485
+ :param conference: Optional conference abbreviation filter
486
+ :type conference: str
487
+ :param season: Optional season filter
488
+ :type season: float
489
+ :param season_type: Optional season type filter
490
+ :type season_type: SeasonType
491
+ :param async_req: Whether to execute the request asynchronously.
492
+ :type async_req: bool, optional
493
+ :param _preload_content: if False, the ApiResponse.data will
494
+ be set to none and raw_data will store the
495
+ HTTP response body without reading/decoding.
496
+ Default is True.
497
+ :type _preload_content: bool, optional
498
+ :param _return_http_data_only: response data instead of ApiResponse
499
+ object with status code, headers, etc
500
+ :type _return_http_data_only: bool, optional
501
+ :param _request_timeout: timeout setting for this request. If one
502
+ number provided, it will be total request
503
+ timeout. It can also be a pair (tuple) of
504
+ (connection, read) timeouts.
505
+ :param _request_auth: set to override the auth_settings for an a single
506
+ request; this effectively ignores the authentication
507
+ in the spec for a single request.
508
+ :type _request_auth: dict, optional
509
+ :type _content_type: string, optional: force content-type for the request
510
+ :return: Returns the result object.
511
+ If the method is called asynchronously,
512
+ returns the request thread.
513
+ :rtype: tuple(List[GameBoxScoreTeam], status_code(int), headers(HTTPHeaderDict))
514
+ """
515
+
516
+ _params = locals()
517
+
518
+ _all_params = [
519
+ 'start_date_range',
520
+ 'end_date_range',
521
+ 'team',
522
+ 'conference',
523
+ 'season',
524
+ 'season_type'
525
+ ]
526
+ _all_params.extend(
527
+ [
528
+ 'async_req',
529
+ '_return_http_data_only',
530
+ '_preload_content',
531
+ '_request_timeout',
532
+ '_request_auth',
533
+ '_content_type',
534
+ '_headers'
535
+ ]
536
+ )
537
+
538
+ # validate the arguments
539
+ for _key, _val in _params['kwargs'].items():
540
+ if _key not in _all_params:
541
+ raise ApiTypeError(
542
+ "Got an unexpected keyword argument '%s'"
543
+ " to method get_game_teams" % _key
544
+ )
545
+ _params[_key] = _val
546
+ del _params['kwargs']
547
+
548
+ _collection_formats = {}
549
+
550
+ # process the path parameters
551
+ _path_params = {}
552
+
553
+ # process the query parameters
554
+ _query_params = []
555
+ if _params.get('start_date_range') is not None: # noqa: E501
556
+ if isinstance(_params['start_date_range'], datetime):
557
+ _query_params.append(('startDateRange', _params['start_date_range'].strftime(self.api_client.configuration.datetime_format)))
558
+ else:
559
+ _query_params.append(('startDateRange', _params['start_date_range']))
560
+
561
+ if _params.get('end_date_range') is not None: # noqa: E501
562
+ if isinstance(_params['end_date_range'], datetime):
563
+ _query_params.append(('endDateRange', _params['end_date_range'].strftime(self.api_client.configuration.datetime_format)))
564
+ else:
565
+ _query_params.append(('endDateRange', _params['end_date_range']))
566
+
567
+ if _params.get('team') is not None: # noqa: E501
568
+ _query_params.append(('team', _params['team']))
569
+
570
+ if _params.get('conference') is not None: # noqa: E501
571
+ _query_params.append(('conference', _params['conference']))
572
+
573
+ if _params.get('season') is not None: # noqa: E501
574
+ _query_params.append(('season', _params['season']))
575
+
576
+ if _params.get('season_type') is not None: # noqa: E501
577
+ _query_params.append(('seasonType', _params['season_type'].value))
578
+
579
+ # process the header parameters
580
+ _header_params = dict(_params.get('_headers', {}))
581
+ # process the form parameters
582
+ _form_params = []
583
+ _files = {}
584
+ # process the body parameter
585
+ _body_params = None
586
+ # set the HTTP header `Accept`
587
+ _header_params['Accept'] = self.api_client.select_header_accept(
588
+ ['application/json']) # noqa: E501
589
+
590
+ # authentication setting
591
+ _auth_settings = ['apiKey'] # noqa: E501
592
+
593
+ _response_types_map = {
594
+ '200': "List[GameBoxScoreTeam]",
595
+ }
596
+
597
+ return self.api_client.call_api(
598
+ '/games/teams', 'GET',
599
+ _path_params,
600
+ _query_params,
601
+ _header_params,
602
+ body=_body_params,
603
+ post_params=_form_params,
604
+ files=_files,
605
+ response_types_map=_response_types_map,
606
+ auth_settings=_auth_settings,
607
+ async_req=_params.get('async_req'),
608
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
609
+ _preload_content=_params.get('_preload_content', True),
610
+ _request_timeout=_params.get('_request_timeout'),
611
+ collection_formats=_collection_formats,
612
+ _request_auth=_params.get('_request_auth'))
613
+
614
+ @validate_arguments
615
+ def get_games(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, status : Annotated[Optional[GameStatus], Field(description="Optional game status filter")] = None, **kwargs) -> List[GameInfo]: # noqa: E501
616
+ """get_games # noqa: E501
617
+
618
+ Returns information on the first 3000 games that match the provided filters, ordered by start date. # noqa: E501
619
+ This method makes a synchronous HTTP request by default. To make an
620
+ asynchronous HTTP request, please pass async_req=True
621
+
622
+ >>> thread = api.get_games(start_date_range, end_date_range, team, conference, season, season_type, status, async_req=True)
623
+ >>> result = thread.get()
624
+
625
+ :param start_date_range: Optional start timestamp in ISO 8601 format
626
+ :type start_date_range: datetime
627
+ :param end_date_range: Optional end timestamp in ISO 8601 format
628
+ :type end_date_range: datetime
629
+ :param team: Optional team name filter
630
+ :type team: str
631
+ :param conference: Optional conference abbreviation filter
632
+ :type conference: str
633
+ :param season: Optional season filter
634
+ :type season: int
635
+ :param season_type: Optional season type filter
636
+ :type season_type: SeasonType
637
+ :param status: Optional game status filter
638
+ :type status: GameStatus
639
+ :param async_req: Whether to execute the request asynchronously.
640
+ :type async_req: bool, optional
641
+ :param _request_timeout: timeout setting for this request.
642
+ If one number provided, it will be total request
643
+ timeout. It can also be a pair (tuple) of
644
+ (connection, read) timeouts.
645
+ :return: Returns the result object.
646
+ If the method is called asynchronously,
647
+ returns the request thread.
648
+ :rtype: List[GameInfo]
649
+ """
650
+ kwargs['_return_http_data_only'] = True
651
+ if '_preload_content' in kwargs:
652
+ message = "Error! Please call the get_games_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
653
+ raise ValueError(message)
654
+ return self.get_games_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, status, **kwargs) # noqa: E501
655
+
656
+ @validate_arguments
657
+ def get_games_with_http_info(self, start_date_range : Annotated[Optional[datetime], Field(description="Optional start timestamp in ISO 8601 format")] = None, end_date_range : Annotated[Optional[datetime], Field(description="Optional end timestamp in ISO 8601 format")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, status : Annotated[Optional[GameStatus], Field(description="Optional game status filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
658
+ """get_games # noqa: E501
659
+
660
+ Returns information on the first 3000 games that match the provided filters, ordered by start date. # noqa: E501
661
+ This method makes a synchronous HTTP request by default. To make an
662
+ asynchronous HTTP request, please pass async_req=True
663
+
664
+ >>> thread = api.get_games_with_http_info(start_date_range, end_date_range, team, conference, season, season_type, status, async_req=True)
665
+ >>> result = thread.get()
666
+
667
+ :param start_date_range: Optional start timestamp in ISO 8601 format
668
+ :type start_date_range: datetime
669
+ :param end_date_range: Optional end timestamp in ISO 8601 format
670
+ :type end_date_range: datetime
671
+ :param team: Optional team name filter
672
+ :type team: str
673
+ :param conference: Optional conference abbreviation filter
674
+ :type conference: str
675
+ :param season: Optional season filter
676
+ :type season: int
677
+ :param season_type: Optional season type filter
678
+ :type season_type: SeasonType
679
+ :param status: Optional game status filter
680
+ :type status: GameStatus
681
+ :param async_req: Whether to execute the request asynchronously.
682
+ :type async_req: bool, optional
683
+ :param _preload_content: if False, the ApiResponse.data will
684
+ be set to none and raw_data will store the
685
+ HTTP response body without reading/decoding.
686
+ Default is True.
687
+ :type _preload_content: bool, optional
688
+ :param _return_http_data_only: response data instead of ApiResponse
689
+ object with status code, headers, etc
690
+ :type _return_http_data_only: bool, optional
691
+ :param _request_timeout: timeout setting for this request. If one
692
+ number provided, it will be total request
693
+ timeout. It can also be a pair (tuple) of
694
+ (connection, read) timeouts.
695
+ :param _request_auth: set to override the auth_settings for an a single
696
+ request; this effectively ignores the authentication
697
+ in the spec for a single request.
698
+ :type _request_auth: dict, optional
699
+ :type _content_type: string, optional: force content-type for the request
700
+ :return: Returns the result object.
701
+ If the method is called asynchronously,
702
+ returns the request thread.
703
+ :rtype: tuple(List[GameInfo], status_code(int), headers(HTTPHeaderDict))
704
+ """
705
+
706
+ _params = locals()
707
+
708
+ _all_params = [
709
+ 'start_date_range',
710
+ 'end_date_range',
711
+ 'team',
712
+ 'conference',
713
+ 'season',
714
+ 'season_type',
715
+ 'status'
716
+ ]
717
+ _all_params.extend(
718
+ [
719
+ 'async_req',
720
+ '_return_http_data_only',
721
+ '_preload_content',
722
+ '_request_timeout',
723
+ '_request_auth',
724
+ '_content_type',
725
+ '_headers'
726
+ ]
727
+ )
728
+
729
+ # validate the arguments
730
+ for _key, _val in _params['kwargs'].items():
731
+ if _key not in _all_params:
732
+ raise ApiTypeError(
733
+ "Got an unexpected keyword argument '%s'"
734
+ " to method get_games" % _key
735
+ )
736
+ _params[_key] = _val
737
+ del _params['kwargs']
738
+
739
+ _collection_formats = {}
740
+
741
+ # process the path parameters
742
+ _path_params = {}
743
+
744
+ # process the query parameters
745
+ _query_params = []
746
+ if _params.get('start_date_range') is not None: # noqa: E501
747
+ if isinstance(_params['start_date_range'], datetime):
748
+ _query_params.append(('startDateRange', _params['start_date_range'].strftime(self.api_client.configuration.datetime_format)))
749
+ else:
750
+ _query_params.append(('startDateRange', _params['start_date_range']))
751
+
752
+ if _params.get('end_date_range') is not None: # noqa: E501
753
+ if isinstance(_params['end_date_range'], datetime):
754
+ _query_params.append(('endDateRange', _params['end_date_range'].strftime(self.api_client.configuration.datetime_format)))
755
+ else:
756
+ _query_params.append(('endDateRange', _params['end_date_range']))
757
+
758
+ if _params.get('team') is not None: # noqa: E501
759
+ _query_params.append(('team', _params['team']))
760
+
761
+ if _params.get('conference') is not None: # noqa: E501
762
+ _query_params.append(('conference', _params['conference']))
763
+
764
+ if _params.get('season') is not None: # noqa: E501
765
+ _query_params.append(('season', _params['season']))
766
+
767
+ if _params.get('season_type') is not None: # noqa: E501
768
+ _query_params.append(('seasonType', _params['season_type'].value))
769
+
770
+ if _params.get('status') is not None: # noqa: E501
771
+ _query_params.append(('status', _params['status'].value))
772
+
773
+ # process the header parameters
774
+ _header_params = dict(_params.get('_headers', {}))
775
+ # process the form parameters
776
+ _form_params = []
777
+ _files = {}
778
+ # process the body parameter
779
+ _body_params = None
780
+ # set the HTTP header `Accept`
781
+ _header_params['Accept'] = self.api_client.select_header_accept(
782
+ ['application/json']) # noqa: E501
783
+
784
+ # authentication setting
785
+ _auth_settings = ['apiKey'] # noqa: E501
786
+
787
+ _response_types_map = {
788
+ '200': "List[GameInfo]",
789
+ }
790
+
791
+ return self.api_client.call_api(
792
+ '/games', 'GET',
793
+ _path_params,
794
+ _query_params,
795
+ _header_params,
796
+ body=_body_params,
797
+ post_params=_form_params,
798
+ files=_files,
799
+ response_types_map=_response_types_map,
800
+ auth_settings=_auth_settings,
801
+ async_req=_params.get('async_req'),
802
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
803
+ _preload_content=_params.get('_preload_content', True),
804
+ _request_timeout=_params.get('_request_timeout'),
805
+ collection_formats=_collection_formats,
806
+ _request_auth=_params.get('_request_auth'))