cbbd 1.1.0a1__py3-none-any.whl

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