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/stats_api.py ADDED
@@ -0,0 +1,423 @@
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.player_season_stats import PlayerSeasonStats
30
+ from cbbd.models.season_type import SeasonType
31
+ from cbbd.models.team_season_stats import TeamSeasonStats
32
+
33
+ from cbbd.api_client import ApiClient
34
+ from cbbd.api_response import ApiResponse
35
+ from cbbd.exceptions import ( # noqa: F401
36
+ ApiTypeError,
37
+ ApiValueError
38
+ )
39
+
40
+
41
+ class StatsApi:
42
+ """NOTE: This class is auto generated by OpenAPI Generator
43
+ Ref: https://openapi-generator.tech
44
+
45
+ Do not edit the class manually.
46
+ """
47
+
48
+ def __init__(self, api_client=None) -> None:
49
+ if api_client is None:
50
+ api_client = ApiClient.get_default()
51
+ self.api_client = api_client
52
+
53
+ @validate_arguments
54
+ def get_player_season_stats(self, season : Annotated[Union[StrictFloat, StrictInt], Field(..., description="Required season filter")], season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, start_date_range : Optional[datetime] = None, end_date_range : Optional[datetime] = None, **kwargs) -> List[PlayerSeasonStats]: # noqa: E501
55
+ """get_player_season_stats # noqa: E501
56
+
57
+ Returns player statistics by season # noqa: E501
58
+ This method makes a synchronous HTTP request by default. To make an
59
+ asynchronous HTTP request, please pass async_req=True
60
+
61
+ >>> thread = api.get_player_season_stats(season, season_type, team, conference, start_date_range, end_date_range, async_req=True)
62
+ >>> result = thread.get()
63
+
64
+ :param season: Required season filter (required)
65
+ :type season: float
66
+ :param season_type: Optional season type filter
67
+ :type season_type: SeasonType
68
+ :param team: Optional team name filter
69
+ :type team: str
70
+ :param conference: Optional conference abbreviation filter
71
+ :type conference: str
72
+ :param start_date_range:
73
+ :type start_date_range: datetime
74
+ :param end_date_range:
75
+ :type end_date_range: datetime
76
+ :param async_req: Whether to execute the request asynchronously.
77
+ :type async_req: bool, optional
78
+ :param _request_timeout: timeout setting for this request.
79
+ If one number provided, it will be total request
80
+ timeout. It can also be a pair (tuple) of
81
+ (connection, read) timeouts.
82
+ :return: Returns the result object.
83
+ If the method is called asynchronously,
84
+ returns the request thread.
85
+ :rtype: List[PlayerSeasonStats]
86
+ """
87
+ kwargs['_return_http_data_only'] = True
88
+ if '_preload_content' in kwargs:
89
+ message = "Error! Please call the get_player_season_stats_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
90
+ raise ValueError(message)
91
+ return self.get_player_season_stats_with_http_info(season, season_type, team, conference, start_date_range, end_date_range, **kwargs) # noqa: E501
92
+
93
+ @validate_arguments
94
+ def get_player_season_stats_with_http_info(self, season : Annotated[Union[StrictFloat, StrictInt], Field(..., description="Required season filter")], season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, start_date_range : Optional[datetime] = None, end_date_range : Optional[datetime] = None, **kwargs) -> ApiResponse: # noqa: E501
95
+ """get_player_season_stats # noqa: E501
96
+
97
+ Returns player statistics by season # noqa: E501
98
+ This method makes a synchronous HTTP request by default. To make an
99
+ asynchronous HTTP request, please pass async_req=True
100
+
101
+ >>> thread = api.get_player_season_stats_with_http_info(season, season_type, team, conference, start_date_range, end_date_range, async_req=True)
102
+ >>> result = thread.get()
103
+
104
+ :param season: Required season filter (required)
105
+ :type season: float
106
+ :param season_type: Optional season type filter
107
+ :type season_type: SeasonType
108
+ :param team: Optional team name filter
109
+ :type team: str
110
+ :param conference: Optional conference abbreviation filter
111
+ :type conference: str
112
+ :param start_date_range:
113
+ :type start_date_range: datetime
114
+ :param end_date_range:
115
+ :type end_date_range: datetime
116
+ :param async_req: Whether to execute the request asynchronously.
117
+ :type async_req: bool, optional
118
+ :param _preload_content: if False, the ApiResponse.data will
119
+ be set to none and raw_data will store the
120
+ HTTP response body without reading/decoding.
121
+ Default is True.
122
+ :type _preload_content: bool, optional
123
+ :param _return_http_data_only: response data instead of ApiResponse
124
+ object with status code, headers, etc
125
+ :type _return_http_data_only: bool, optional
126
+ :param _request_timeout: timeout setting for this request. If one
127
+ number provided, it will be total request
128
+ timeout. It can also be a pair (tuple) of
129
+ (connection, read) timeouts.
130
+ :param _request_auth: set to override the auth_settings for an a single
131
+ request; this effectively ignores the authentication
132
+ in the spec for a single request.
133
+ :type _request_auth: dict, optional
134
+ :type _content_type: string, optional: force content-type for the request
135
+ :return: Returns the result object.
136
+ If the method is called asynchronously,
137
+ returns the request thread.
138
+ :rtype: tuple(List[PlayerSeasonStats], status_code(int), headers(HTTPHeaderDict))
139
+ """
140
+
141
+ _params = locals()
142
+
143
+ _all_params = [
144
+ 'season',
145
+ 'season_type',
146
+ 'team',
147
+ 'conference',
148
+ 'start_date_range',
149
+ 'end_date_range'
150
+ ]
151
+ _all_params.extend(
152
+ [
153
+ 'async_req',
154
+ '_return_http_data_only',
155
+ '_preload_content',
156
+ '_request_timeout',
157
+ '_request_auth',
158
+ '_content_type',
159
+ '_headers'
160
+ ]
161
+ )
162
+
163
+ # validate the arguments
164
+ for _key, _val in _params['kwargs'].items():
165
+ if _key not in _all_params:
166
+ raise ApiTypeError(
167
+ "Got an unexpected keyword argument '%s'"
168
+ " to method get_player_season_stats" % _key
169
+ )
170
+ _params[_key] = _val
171
+ del _params['kwargs']
172
+
173
+ _collection_formats = {}
174
+
175
+ # process the path parameters
176
+ _path_params = {}
177
+
178
+ # process the query parameters
179
+ _query_params = []
180
+ if _params.get('season') is not None: # noqa: E501
181
+ _query_params.append(('season', _params['season']))
182
+
183
+ if _params.get('season_type') is not None: # noqa: E501
184
+ _query_params.append(('seasonType', _params['season_type'].value))
185
+
186
+ if _params.get('team') is not None: # noqa: E501
187
+ _query_params.append(('team', _params['team']))
188
+
189
+ if _params.get('conference') is not None: # noqa: E501
190
+ _query_params.append(('conference', _params['conference']))
191
+
192
+ if _params.get('start_date_range') is not None: # noqa: E501
193
+ if isinstance(_params['start_date_range'], datetime):
194
+ _query_params.append(('startDateRange', _params['start_date_range'].strftime(self.api_client.configuration.datetime_format)))
195
+ else:
196
+ _query_params.append(('startDateRange', _params['start_date_range']))
197
+
198
+ if _params.get('end_date_range') is not None: # noqa: E501
199
+ if isinstance(_params['end_date_range'], datetime):
200
+ _query_params.append(('endDateRange', _params['end_date_range'].strftime(self.api_client.configuration.datetime_format)))
201
+ else:
202
+ _query_params.append(('endDateRange', _params['end_date_range']))
203
+
204
+ # process the header parameters
205
+ _header_params = dict(_params.get('_headers', {}))
206
+ # process the form parameters
207
+ _form_params = []
208
+ _files = {}
209
+ # process the body parameter
210
+ _body_params = None
211
+ # set the HTTP header `Accept`
212
+ _header_params['Accept'] = self.api_client.select_header_accept(
213
+ ['application/json']) # noqa: E501
214
+
215
+ # authentication setting
216
+ _auth_settings = ['apiKey'] # noqa: E501
217
+
218
+ _response_types_map = {
219
+ '200': "List[PlayerSeasonStats]",
220
+ }
221
+
222
+ return self.api_client.call_api(
223
+ '/stats/player/season', 'GET',
224
+ _path_params,
225
+ _query_params,
226
+ _header_params,
227
+ body=_body_params,
228
+ post_params=_form_params,
229
+ files=_files,
230
+ response_types_map=_response_types_map,
231
+ auth_settings=_auth_settings,
232
+ async_req=_params.get('async_req'),
233
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
234
+ _preload_content=_params.get('_preload_content', True),
235
+ _request_timeout=_params.get('_request_timeout'),
236
+ collection_formats=_collection_formats,
237
+ _request_auth=_params.get('_request_auth'))
238
+
239
+ @validate_arguments
240
+ def get_team_season_stats(self, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter, required if team is not provided")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter, required if season is not provided")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, start_date_range : Optional[datetime] = None, end_date_range : Optional[datetime] = None, **kwargs) -> List[TeamSeasonStats]: # noqa: E501
241
+ """get_team_season_stats # noqa: E501
242
+
243
+ Returns team season statistics by year or team # noqa: E501
244
+ This method makes a synchronous HTTP request by default. To make an
245
+ asynchronous HTTP request, please pass async_req=True
246
+
247
+ >>> thread = api.get_team_season_stats(season, season_type, team, conference, start_date_range, end_date_range, async_req=True)
248
+ >>> result = thread.get()
249
+
250
+ :param season: Optional season filter, required if team is not provided
251
+ :type season: float
252
+ :param season_type: Optional season type filter
253
+ :type season_type: SeasonType
254
+ :param team: Optional team name filter, required if season is not provided
255
+ :type team: str
256
+ :param conference: Optional conference abbreviation filter
257
+ :type conference: str
258
+ :param start_date_range:
259
+ :type start_date_range: datetime
260
+ :param end_date_range:
261
+ :type end_date_range: datetime
262
+ :param async_req: Whether to execute the request asynchronously.
263
+ :type async_req: bool, optional
264
+ :param _request_timeout: timeout setting for this request.
265
+ If one number provided, it will be total request
266
+ timeout. It can also be a pair (tuple) of
267
+ (connection, read) timeouts.
268
+ :return: Returns the result object.
269
+ If the method is called asynchronously,
270
+ returns the request thread.
271
+ :rtype: List[TeamSeasonStats]
272
+ """
273
+ kwargs['_return_http_data_only'] = True
274
+ if '_preload_content' in kwargs:
275
+ message = "Error! Please call the get_team_season_stats_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
276
+ raise ValueError(message)
277
+ return self.get_team_season_stats_with_http_info(season, season_type, team, conference, start_date_range, end_date_range, **kwargs) # noqa: E501
278
+
279
+ @validate_arguments
280
+ def get_team_season_stats_with_http_info(self, season : Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optional season filter, required if team is not provided")] = None, season_type : Annotated[Optional[SeasonType], Field(description="Optional season type filter")] = None, team : Annotated[Optional[StrictStr], Field(description="Optional team name filter, required if season is not provided")] = None, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, start_date_range : Optional[datetime] = None, end_date_range : Optional[datetime] = None, **kwargs) -> ApiResponse: # noqa: E501
281
+ """get_team_season_stats # noqa: E501
282
+
283
+ Returns team season statistics by year or team # noqa: E501
284
+ This method makes a synchronous HTTP request by default. To make an
285
+ asynchronous HTTP request, please pass async_req=True
286
+
287
+ >>> thread = api.get_team_season_stats_with_http_info(season, season_type, team, conference, start_date_range, end_date_range, async_req=True)
288
+ >>> result = thread.get()
289
+
290
+ :param season: Optional season filter, required if team is not provided
291
+ :type season: float
292
+ :param season_type: Optional season type filter
293
+ :type season_type: SeasonType
294
+ :param team: Optional team name filter, required if season is not provided
295
+ :type team: str
296
+ :param conference: Optional conference abbreviation filter
297
+ :type conference: str
298
+ :param start_date_range:
299
+ :type start_date_range: datetime
300
+ :param end_date_range:
301
+ :type end_date_range: datetime
302
+ :param async_req: Whether to execute the request asynchronously.
303
+ :type async_req: bool, optional
304
+ :param _preload_content: if False, the ApiResponse.data will
305
+ be set to none and raw_data will store the
306
+ HTTP response body without reading/decoding.
307
+ Default is True.
308
+ :type _preload_content: bool, optional
309
+ :param _return_http_data_only: response data instead of ApiResponse
310
+ object with status code, headers, etc
311
+ :type _return_http_data_only: bool, optional
312
+ :param _request_timeout: timeout setting for this request. If one
313
+ number provided, it will be total request
314
+ timeout. It can also be a pair (tuple) of
315
+ (connection, read) timeouts.
316
+ :param _request_auth: set to override the auth_settings for an a single
317
+ request; this effectively ignores the authentication
318
+ in the spec for a single request.
319
+ :type _request_auth: dict, optional
320
+ :type _content_type: string, optional: force content-type for the request
321
+ :return: Returns the result object.
322
+ If the method is called asynchronously,
323
+ returns the request thread.
324
+ :rtype: tuple(List[TeamSeasonStats], status_code(int), headers(HTTPHeaderDict))
325
+ """
326
+
327
+ _params = locals()
328
+
329
+ _all_params = [
330
+ 'season',
331
+ 'season_type',
332
+ 'team',
333
+ 'conference',
334
+ 'start_date_range',
335
+ 'end_date_range'
336
+ ]
337
+ _all_params.extend(
338
+ [
339
+ 'async_req',
340
+ '_return_http_data_only',
341
+ '_preload_content',
342
+ '_request_timeout',
343
+ '_request_auth',
344
+ '_content_type',
345
+ '_headers'
346
+ ]
347
+ )
348
+
349
+ # validate the arguments
350
+ for _key, _val in _params['kwargs'].items():
351
+ if _key not in _all_params:
352
+ raise ApiTypeError(
353
+ "Got an unexpected keyword argument '%s'"
354
+ " to method get_team_season_stats" % _key
355
+ )
356
+ _params[_key] = _val
357
+ del _params['kwargs']
358
+
359
+ _collection_formats = {}
360
+
361
+ # process the path parameters
362
+ _path_params = {}
363
+
364
+ # process the query parameters
365
+ _query_params = []
366
+ if _params.get('season') is not None: # noqa: E501
367
+ _query_params.append(('season', _params['season']))
368
+
369
+ if _params.get('season_type') is not None: # noqa: E501
370
+ _query_params.append(('seasonType', _params['season_type'].value))
371
+
372
+ if _params.get('team') is not None: # noqa: E501
373
+ _query_params.append(('team', _params['team']))
374
+
375
+ if _params.get('conference') is not None: # noqa: E501
376
+ _query_params.append(('conference', _params['conference']))
377
+
378
+ if _params.get('start_date_range') is not None: # noqa: E501
379
+ if isinstance(_params['start_date_range'], datetime):
380
+ _query_params.append(('startDateRange', _params['start_date_range'].strftime(self.api_client.configuration.datetime_format)))
381
+ else:
382
+ _query_params.append(('startDateRange', _params['start_date_range']))
383
+
384
+ if _params.get('end_date_range') is not None: # noqa: E501
385
+ if isinstance(_params['end_date_range'], datetime):
386
+ _query_params.append(('endDateRange', _params['end_date_range'].strftime(self.api_client.configuration.datetime_format)))
387
+ else:
388
+ _query_params.append(('endDateRange', _params['end_date_range']))
389
+
390
+ # process the header parameters
391
+ _header_params = dict(_params.get('_headers', {}))
392
+ # process the form parameters
393
+ _form_params = []
394
+ _files = {}
395
+ # process the body parameter
396
+ _body_params = None
397
+ # set the HTTP header `Accept`
398
+ _header_params['Accept'] = self.api_client.select_header_accept(
399
+ ['application/json']) # noqa: E501
400
+
401
+ # authentication setting
402
+ _auth_settings = ['apiKey'] # noqa: E501
403
+
404
+ _response_types_map = {
405
+ '200': "List[TeamSeasonStats]",
406
+ }
407
+
408
+ return self.api_client.call_api(
409
+ '/stats/team/season', 'GET',
410
+ _path_params,
411
+ _query_params,
412
+ _header_params,
413
+ body=_body_params,
414
+ post_params=_form_params,
415
+ files=_files,
416
+ response_types_map=_response_types_map,
417
+ auth_settings=_auth_settings,
418
+ async_req=_params.get('async_req'),
419
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
420
+ _preload_content=_params.get('_preload_content', True),
421
+ _request_timeout=_params.get('_request_timeout'),
422
+ collection_formats=_collection_formats,
423
+ _request_auth=_params.get('_request_auth'))
cbbd/api/teams_api.py ADDED
@@ -0,0 +1,195 @@
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 pydantic import Field, StrictInt, StrictStr
24
+
25
+ from typing import List, Optional
26
+
27
+ from cbbd.models.team_info import TeamInfo
28
+
29
+ from cbbd.api_client import ApiClient
30
+ from cbbd.api_response import ApiResponse
31
+ from cbbd.exceptions import ( # noqa: F401
32
+ ApiTypeError,
33
+ ApiValueError
34
+ )
35
+
36
+
37
+ class TeamsApi:
38
+ """NOTE: This class is auto generated by OpenAPI Generator
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+ """
43
+
44
+ def __init__(self, api_client=None) -> None:
45
+ if api_client is None:
46
+ api_client = ApiClient.get_default()
47
+ self.api_client = api_client
48
+
49
+ @validate_arguments
50
+ def get_teams(self, conference : Annotated[Optional[StrictStr], Field(description="Optional conference filter")] = None, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, **kwargs) -> List[TeamInfo]: # noqa: E501
51
+ """get_teams # noqa: E501
52
+
53
+ Retrieves historical team information # noqa: E501
54
+ This method makes a synchronous HTTP request by default. To make an
55
+ asynchronous HTTP request, please pass async_req=True
56
+
57
+ >>> thread = api.get_teams(conference, season, async_req=True)
58
+ >>> result = thread.get()
59
+
60
+ :param conference: Optional conference filter
61
+ :type conference: str
62
+ :param season: Optional season filter
63
+ :type season: int
64
+ :param async_req: Whether to execute the request asynchronously.
65
+ :type async_req: bool, optional
66
+ :param _request_timeout: timeout setting for this request.
67
+ If one number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :return: Returns the result object.
71
+ If the method is called asynchronously,
72
+ returns the request thread.
73
+ :rtype: List[TeamInfo]
74
+ """
75
+ kwargs['_return_http_data_only'] = True
76
+ if '_preload_content' in kwargs:
77
+ message = "Error! Please call the get_teams_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
78
+ raise ValueError(message)
79
+ return self.get_teams_with_http_info(conference, season, **kwargs) # noqa: E501
80
+
81
+ @validate_arguments
82
+ def get_teams_with_http_info(self, conference : Annotated[Optional[StrictStr], Field(description="Optional conference filter")] = None, season : Annotated[Optional[StrictInt], Field(description="Optional season filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
83
+ """get_teams # noqa: E501
84
+
85
+ Retrieves historical team information # noqa: E501
86
+ This method makes a synchronous HTTP request by default. To make an
87
+ asynchronous HTTP request, please pass async_req=True
88
+
89
+ >>> thread = api.get_teams_with_http_info(conference, season, async_req=True)
90
+ >>> result = thread.get()
91
+
92
+ :param conference: Optional conference filter
93
+ :type conference: str
94
+ :param season: Optional season filter
95
+ :type season: int
96
+ :param async_req: Whether to execute the request asynchronously.
97
+ :type async_req: bool, optional
98
+ :param _preload_content: if False, the ApiResponse.data will
99
+ be set to none and raw_data will store the
100
+ HTTP response body without reading/decoding.
101
+ Default is True.
102
+ :type _preload_content: bool, optional
103
+ :param _return_http_data_only: response data instead of ApiResponse
104
+ object with status code, headers, etc
105
+ :type _return_http_data_only: bool, optional
106
+ :param _request_timeout: timeout setting for this request. If one
107
+ number provided, it will be total request
108
+ timeout. It can also be a pair (tuple) of
109
+ (connection, read) timeouts.
110
+ :param _request_auth: set to override the auth_settings for an a single
111
+ request; this effectively ignores the authentication
112
+ in the spec for a single request.
113
+ :type _request_auth: dict, optional
114
+ :type _content_type: string, optional: force content-type for the request
115
+ :return: Returns the result object.
116
+ If the method is called asynchronously,
117
+ returns the request thread.
118
+ :rtype: tuple(List[TeamInfo], status_code(int), headers(HTTPHeaderDict))
119
+ """
120
+
121
+ _params = locals()
122
+
123
+ _all_params = [
124
+ 'conference',
125
+ 'season'
126
+ ]
127
+ _all_params.extend(
128
+ [
129
+ 'async_req',
130
+ '_return_http_data_only',
131
+ '_preload_content',
132
+ '_request_timeout',
133
+ '_request_auth',
134
+ '_content_type',
135
+ '_headers'
136
+ ]
137
+ )
138
+
139
+ # validate the arguments
140
+ for _key, _val in _params['kwargs'].items():
141
+ if _key not in _all_params:
142
+ raise ApiTypeError(
143
+ "Got an unexpected keyword argument '%s'"
144
+ " to method get_teams" % _key
145
+ )
146
+ _params[_key] = _val
147
+ del _params['kwargs']
148
+
149
+ _collection_formats = {}
150
+
151
+ # process the path parameters
152
+ _path_params = {}
153
+
154
+ # process the query parameters
155
+ _query_params = []
156
+ if _params.get('conference') is not None: # noqa: E501
157
+ _query_params.append(('conference', _params['conference']))
158
+
159
+ if _params.get('season') is not None: # noqa: E501
160
+ _query_params.append(('season', _params['season']))
161
+
162
+ # process the header parameters
163
+ _header_params = dict(_params.get('_headers', {}))
164
+ # process the form parameters
165
+ _form_params = []
166
+ _files = {}
167
+ # process the body parameter
168
+ _body_params = None
169
+ # set the HTTP header `Accept`
170
+ _header_params['Accept'] = self.api_client.select_header_accept(
171
+ ['application/json']) # noqa: E501
172
+
173
+ # authentication setting
174
+ _auth_settings = ['apiKey'] # noqa: E501
175
+
176
+ _response_types_map = {
177
+ '200': "List[TeamInfo]",
178
+ }
179
+
180
+ return self.api_client.call_api(
181
+ '/teams', 'GET',
182
+ _path_params,
183
+ _query_params,
184
+ _header_params,
185
+ body=_body_params,
186
+ post_params=_form_params,
187
+ files=_files,
188
+ response_types_map=_response_types_map,
189
+ auth_settings=_auth_settings,
190
+ async_req=_params.get('async_req'),
191
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
192
+ _preload_content=_params.get('_preload_content', True),
193
+ _request_timeout=_params.get('_request_timeout'),
194
+ collection_formats=_collection_formats,
195
+ _request_auth=_params.get('_request_auth'))