cbbd 1.1.3__py3-none-any.whl → 1.2.0__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 (47) hide show
  1. cbbd/__init__.py +7 -2
  2. cbbd/api/conferences_api.py +146 -2
  3. cbbd/api/games_api.py +1 -1
  4. cbbd/api/plays_api.py +1 -1
  5. cbbd/api/stats_api.py +1 -1
  6. cbbd/api/teams_api.py +150 -1
  7. cbbd/api/venues_api.py +1 -1
  8. cbbd/api_client.py +2 -2
  9. cbbd/configuration.py +3 -3
  10. cbbd/exceptions.py +1 -1
  11. cbbd/models/__init__.py +6 -1
  12. cbbd/models/conference_history.py +90 -0
  13. cbbd/models/conference_history_teams_inner.py +92 -0
  14. cbbd/models/conference_info.py +1 -1
  15. cbbd/models/game_box_score_players.py +1 -1
  16. cbbd/models/game_box_score_players_players_inner.py +1 -1
  17. cbbd/models/game_box_score_team.py +1 -1
  18. cbbd/models/game_box_score_team_stats.py +1 -1
  19. cbbd/models/game_box_score_team_stats_points.py +1 -1
  20. cbbd/models/game_info.py +1 -1
  21. cbbd/models/game_media_info.py +1 -1
  22. cbbd/models/game_media_info_broadcasts_inner.py +1 -1
  23. cbbd/models/game_status.py +1 -1
  24. cbbd/models/play_info.py +1 -1
  25. cbbd/models/play_info_participants_inner.py +1 -1
  26. cbbd/models/play_type_info.py +1 -1
  27. cbbd/models/player_season_stats.py +1 -1
  28. cbbd/models/season_type.py +1 -1
  29. cbbd/models/team_info.py +1 -1
  30. cbbd/models/team_roster.py +95 -0
  31. cbbd/models/team_roster_player.py +135 -0
  32. cbbd/models/team_roster_player_hometown.py +91 -0
  33. cbbd/models/team_season_stats.py +1 -1
  34. cbbd/models/team_season_unit_stats.py +1 -1
  35. cbbd/models/team_season_unit_stats_field_goals.py +1 -1
  36. cbbd/models/team_season_unit_stats_fouls.py +1 -1
  37. cbbd/models/team_season_unit_stats_four_factors.py +1 -1
  38. cbbd/models/team_season_unit_stats_points.py +1 -1
  39. cbbd/models/team_season_unit_stats_rebounds.py +1 -1
  40. cbbd/models/team_season_unit_stats_turnovers.py +1 -1
  41. cbbd/models/venue_info.py +1 -1
  42. cbbd/rest.py +1 -1
  43. {cbbd-1.1.3.dist-info → cbbd-1.2.0.dist-info}/METADATA +1 -1
  44. cbbd-1.2.0.dist-info/RECORD +49 -0
  45. cbbd-1.1.3.dist-info/RECORD +0 -44
  46. {cbbd-1.1.3.dist-info → cbbd-1.2.0.dist-info}/WHEEL +0 -0
  47. {cbbd-1.1.3.dist-info → cbbd-1.2.0.dist-info}/top_level.txt +0 -0
cbbd/__init__.py CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  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.
9
9
 
10
- The version of the OpenAPI document: 1.1.3
10
+ The version of the OpenAPI document: 1.2.0
11
11
  Contact: admin@collegefootballdata.com
12
12
  Generated by OpenAPI Generator (https://openapi-generator.tech)
13
13
 
@@ -15,7 +15,7 @@
15
15
  """ # noqa: E501
16
16
 
17
17
 
18
- __version__ = "1.1.3"
18
+ __version__ = "1.2.0"
19
19
 
20
20
  # import apis into sdk package
21
21
  from cbbd.api.conferences_api import ConferencesApi
@@ -37,6 +37,8 @@ from cbbd.exceptions import ApiAttributeError
37
37
  from cbbd.exceptions import ApiException
38
38
 
39
39
  # import models into sdk package
40
+ from cbbd.models.conference_history import ConferenceHistory
41
+ from cbbd.models.conference_history_teams_inner import ConferenceHistoryTeamsInner
40
42
  from cbbd.models.conference_info import ConferenceInfo
41
43
  from cbbd.models.game_box_score_players import GameBoxScorePlayers
42
44
  from cbbd.models.game_box_score_players_players_inner import GameBoxScorePlayersPlayersInner
@@ -53,6 +55,9 @@ from cbbd.models.play_type_info import PlayTypeInfo
53
55
  from cbbd.models.player_season_stats import PlayerSeasonStats
54
56
  from cbbd.models.season_type import SeasonType
55
57
  from cbbd.models.team_info import TeamInfo
58
+ from cbbd.models.team_roster import TeamRoster
59
+ from cbbd.models.team_roster_player import TeamRosterPlayer
60
+ from cbbd.models.team_roster_player_hometown import TeamRosterPlayerHometown
56
61
  from cbbd.models.team_season_stats import TeamSeasonStats
57
62
  from cbbd.models.team_season_unit_stats import TeamSeasonUnitStats
58
63
  from cbbd.models.team_season_unit_stats_field_goals import TeamSeasonUnitStatsFieldGoals
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -19,8 +19,12 @@ import warnings
19
19
 
20
20
  from pydantic import validate_arguments, ValidationError
21
21
 
22
- from typing import List
22
+ from typing_extensions import Annotated
23
+ from pydantic import Field, StrictStr
23
24
 
25
+ from typing import List, Optional
26
+
27
+ from cbbd.models.conference_history import ConferenceHistory
24
28
  from cbbd.models.conference_info import ConferenceInfo
25
29
 
26
30
  from cbbd.api_client import ApiClient
@@ -43,6 +47,146 @@ class ConferencesApi:
43
47
  api_client = ApiClient.get_default()
44
48
  self.api_client = api_client
45
49
 
50
+ @validate_arguments
51
+ def get_conference_history(self, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, **kwargs) -> List[ConferenceHistory]: # noqa: E501
52
+ """get_conference_history # noqa: E501
53
+
54
+ Retrieves historical conference membership information # noqa: E501
55
+ This method makes a synchronous HTTP request by default. To make an
56
+ asynchronous HTTP request, please pass async_req=True
57
+
58
+ >>> thread = api.get_conference_history(conference, async_req=True)
59
+ >>> result = thread.get()
60
+
61
+ :param conference: Optional conference abbreviation filter
62
+ :type conference: str
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[ConferenceHistory]
73
+ """
74
+ kwargs['_return_http_data_only'] = True
75
+ if '_preload_content' in kwargs:
76
+ message = "Error! Please call the get_conference_history_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_conference_history_with_http_info(conference, **kwargs) # noqa: E501
79
+
80
+ @validate_arguments
81
+ def get_conference_history_with_http_info(self, conference : Annotated[Optional[StrictStr], Field(description="Optional conference abbreviation filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
82
+ """get_conference_history # noqa: E501
83
+
84
+ Retrieves historical conference membership information # 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_conference_history_with_http_info(conference, async_req=True)
89
+ >>> result = thread.get()
90
+
91
+ :param conference: Optional conference abbreviation filter
92
+ :type conference: str
93
+ :param async_req: Whether to execute the request asynchronously.
94
+ :type async_req: bool, optional
95
+ :param _preload_content: if False, the ApiResponse.data will
96
+ be set to none and raw_data will store the
97
+ HTTP response body without reading/decoding.
98
+ Default is True.
99
+ :type _preload_content: bool, optional
100
+ :param _return_http_data_only: response data instead of ApiResponse
101
+ object with status code, headers, etc
102
+ :type _return_http_data_only: bool, optional
103
+ :param _request_timeout: timeout setting for this request. If one
104
+ number provided, it will be total request
105
+ timeout. It can also be a pair (tuple) of
106
+ (connection, read) timeouts.
107
+ :param _request_auth: set to override the auth_settings for an a single
108
+ request; this effectively ignores the authentication
109
+ in the spec for a single request.
110
+ :type _request_auth: dict, optional
111
+ :type _content_type: string, optional: force content-type for the request
112
+ :return: Returns the result object.
113
+ If the method is called asynchronously,
114
+ returns the request thread.
115
+ :rtype: tuple(List[ConferenceHistory], status_code(int), headers(HTTPHeaderDict))
116
+ """
117
+
118
+ _params = locals()
119
+
120
+ _all_params = [
121
+ 'conference'
122
+ ]
123
+ _all_params.extend(
124
+ [
125
+ 'async_req',
126
+ '_return_http_data_only',
127
+ '_preload_content',
128
+ '_request_timeout',
129
+ '_request_auth',
130
+ '_content_type',
131
+ '_headers'
132
+ ]
133
+ )
134
+
135
+ # validate the arguments
136
+ for _key, _val in _params['kwargs'].items():
137
+ if _key not in _all_params:
138
+ raise ApiTypeError(
139
+ "Got an unexpected keyword argument '%s'"
140
+ " to method get_conference_history" % _key
141
+ )
142
+ _params[_key] = _val
143
+ del _params['kwargs']
144
+
145
+ _collection_formats = {}
146
+
147
+ # process the path parameters
148
+ _path_params = {}
149
+
150
+ # process the query parameters
151
+ _query_params = []
152
+ if _params.get('conference') is not None: # noqa: E501
153
+ _query_params.append(('conference', _params['conference']))
154
+
155
+ # process the header parameters
156
+ _header_params = dict(_params.get('_headers', {}))
157
+ # process the form parameters
158
+ _form_params = []
159
+ _files = {}
160
+ # process the body parameter
161
+ _body_params = None
162
+ # set the HTTP header `Accept`
163
+ _header_params['Accept'] = self.api_client.select_header_accept(
164
+ ['application/json']) # noqa: E501
165
+
166
+ # authentication setting
167
+ _auth_settings = ['apiKey'] # noqa: E501
168
+
169
+ _response_types_map = {
170
+ '200': "List[ConferenceHistory]",
171
+ }
172
+
173
+ return self.api_client.call_api(
174
+ '/conferences/history', 'GET',
175
+ _path_params,
176
+ _query_params,
177
+ _header_params,
178
+ body=_body_params,
179
+ post_params=_form_params,
180
+ files=_files,
181
+ response_types_map=_response_types_map,
182
+ auth_settings=_auth_settings,
183
+ async_req=_params.get('async_req'),
184
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
185
+ _preload_content=_params.get('_preload_content', True),
186
+ _request_timeout=_params.get('_request_timeout'),
187
+ collection_formats=_collection_formats,
188
+ _request_auth=_params.get('_request_auth'))
189
+
46
190
  @validate_arguments
47
191
  def get_conferences(self, **kwargs) -> List[ConferenceInfo]: # noqa: E501
48
192
  """get_conferences # noqa: E501
cbbd/api/games_api.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
cbbd/api/plays_api.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
cbbd/api/stats_api.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
cbbd/api/teams_api.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -25,6 +25,7 @@ from pydantic import Field, StrictInt, StrictStr
25
25
  from typing import List, Optional
26
26
 
27
27
  from cbbd.models.team_info import TeamInfo
28
+ from cbbd.models.team_roster import TeamRoster
28
29
 
29
30
  from cbbd.api_client import ApiClient
30
31
  from cbbd.api_response import ApiResponse
@@ -46,6 +47,154 @@ class TeamsApi:
46
47
  api_client = ApiClient.get_default()
47
48
  self.api_client = api_client
48
49
 
50
+ @validate_arguments
51
+ def get_team_roster(self, season : Annotated[StrictInt, Field(..., description="Season filter")], team : Annotated[Optional[StrictStr], Field(description="Optional team filter")] = None, **kwargs) -> List[TeamRoster]: # noqa: E501
52
+ """get_team_roster # noqa: E501
53
+
54
+ Retrieves team roster information # noqa: E501
55
+ This method makes a synchronous HTTP request by default. To make an
56
+ asynchronous HTTP request, please pass async_req=True
57
+
58
+ >>> thread = api.get_team_roster(season, team, async_req=True)
59
+ >>> result = thread.get()
60
+
61
+ :param season: Season filter (required)
62
+ :type season: int
63
+ :param team: Optional team filter
64
+ :type team: str
65
+ :param async_req: Whether to execute the request asynchronously.
66
+ :type async_req: bool, optional
67
+ :param _request_timeout: timeout setting for this request.
68
+ If one number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :return: Returns the result object.
72
+ If the method is called asynchronously,
73
+ returns the request thread.
74
+ :rtype: List[TeamRoster]
75
+ """
76
+ kwargs['_return_http_data_only'] = True
77
+ if '_preload_content' in kwargs:
78
+ message = "Error! Please call the get_team_roster_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
79
+ raise ValueError(message)
80
+ return self.get_team_roster_with_http_info(season, team, **kwargs) # noqa: E501
81
+
82
+ @validate_arguments
83
+ def get_team_roster_with_http_info(self, season : Annotated[StrictInt, Field(..., description="Season filter")], team : Annotated[Optional[StrictStr], Field(description="Optional team filter")] = None, **kwargs) -> ApiResponse: # noqa: E501
84
+ """get_team_roster # noqa: E501
85
+
86
+ Retrieves team roster information # noqa: E501
87
+ This method makes a synchronous HTTP request by default. To make an
88
+ asynchronous HTTP request, please pass async_req=True
89
+
90
+ >>> thread = api.get_team_roster_with_http_info(season, team, async_req=True)
91
+ >>> result = thread.get()
92
+
93
+ :param season: Season filter (required)
94
+ :type season: int
95
+ :param team: Optional team filter
96
+ :type team: str
97
+ :param async_req: Whether to execute the request asynchronously.
98
+ :type async_req: bool, optional
99
+ :param _preload_content: if False, the ApiResponse.data will
100
+ be set to none and raw_data will store the
101
+ HTTP response body without reading/decoding.
102
+ Default is True.
103
+ :type _preload_content: bool, optional
104
+ :param _return_http_data_only: response data instead of ApiResponse
105
+ object with status code, headers, etc
106
+ :type _return_http_data_only: bool, optional
107
+ :param _request_timeout: timeout setting for this request. If one
108
+ number provided, it will be total request
109
+ timeout. It can also be a pair (tuple) of
110
+ (connection, read) timeouts.
111
+ :param _request_auth: set to override the auth_settings for an a single
112
+ request; this effectively ignores the authentication
113
+ in the spec for a single request.
114
+ :type _request_auth: dict, optional
115
+ :type _content_type: string, optional: force content-type for the request
116
+ :return: Returns the result object.
117
+ If the method is called asynchronously,
118
+ returns the request thread.
119
+ :rtype: tuple(List[TeamRoster], status_code(int), headers(HTTPHeaderDict))
120
+ """
121
+
122
+ _params = locals()
123
+
124
+ _all_params = [
125
+ 'season',
126
+ 'team'
127
+ ]
128
+ _all_params.extend(
129
+ [
130
+ 'async_req',
131
+ '_return_http_data_only',
132
+ '_preload_content',
133
+ '_request_timeout',
134
+ '_request_auth',
135
+ '_content_type',
136
+ '_headers'
137
+ ]
138
+ )
139
+
140
+ # validate the arguments
141
+ for _key, _val in _params['kwargs'].items():
142
+ if _key not in _all_params:
143
+ raise ApiTypeError(
144
+ "Got an unexpected keyword argument '%s'"
145
+ " to method get_team_roster" % _key
146
+ )
147
+ _params[_key] = _val
148
+ del _params['kwargs']
149
+
150
+ _collection_formats = {}
151
+
152
+ # process the path parameters
153
+ _path_params = {}
154
+
155
+ # process the query parameters
156
+ _query_params = []
157
+ if _params.get('season') is not None: # noqa: E501
158
+ _query_params.append(('season', _params['season']))
159
+
160
+ if _params.get('team') is not None: # noqa: E501
161
+ _query_params.append(('team', _params['team']))
162
+
163
+ # process the header parameters
164
+ _header_params = dict(_params.get('_headers', {}))
165
+ # process the form parameters
166
+ _form_params = []
167
+ _files = {}
168
+ # process the body parameter
169
+ _body_params = None
170
+ # set the HTTP header `Accept`
171
+ _header_params['Accept'] = self.api_client.select_header_accept(
172
+ ['application/json']) # noqa: E501
173
+
174
+ # authentication setting
175
+ _auth_settings = ['apiKey'] # noqa: E501
176
+
177
+ _response_types_map = {
178
+ '200': "List[TeamRoster]",
179
+ }
180
+
181
+ return self.api_client.call_api(
182
+ '/teams/roster', 'GET',
183
+ _path_params,
184
+ _query_params,
185
+ _header_params,
186
+ body=_body_params,
187
+ post_params=_form_params,
188
+ files=_files,
189
+ response_types_map=_response_types_map,
190
+ auth_settings=_auth_settings,
191
+ async_req=_params.get('async_req'),
192
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
193
+ _preload_content=_params.get('_preload_content', True),
194
+ _request_timeout=_params.get('_request_timeout'),
195
+ collection_formats=_collection_formats,
196
+ _request_auth=_params.get('_request_auth'))
197
+
49
198
  @validate_arguments
50
199
  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
200
  """get_teams # noqa: E501
cbbd/api/venues_api.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
cbbd/api_client.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -78,7 +78,7 @@ class ApiClient:
78
78
  self.default_headers[header_name] = header_value
79
79
  self.cookie = cookie
80
80
  # Set default User-Agent.
81
- self.user_agent = 'OpenAPI-Generator/1.1.3/python'
81
+ self.user_agent = 'OpenAPI-Generator/1.2.0/python'
82
82
  self.client_side_validation = configuration.client_side_validation
83
83
 
84
84
  def __enter__(self):
cbbd/configuration.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -376,8 +376,8 @@ class Configuration:
376
376
  return "Python SDK Debug Report:\n"\
377
377
  "OS: {env}\n"\
378
378
  "Python Version: {pyversion}\n"\
379
- "Version of the API: 1.1.3\n"\
380
- "SDK Package Version: 1.1.3".\
379
+ "Version of the API: 1.2.0\n"\
380
+ "SDK Package Version: 1.2.0".\
381
381
  format(env=sys.platform, pyversion=sys.version)
382
382
 
383
383
  def get_host_settings(self):
cbbd/exceptions.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
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
7
 
8
- The version of the OpenAPI document: 1.1.3
8
+ The version of the OpenAPI document: 1.2.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
cbbd/models/__init__.py CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  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.
8
8
 
9
- The version of the OpenAPI document: 1.1.3
9
+ The version of the OpenAPI document: 1.2.0
10
10
  Contact: admin@collegefootballdata.com
11
11
  Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
@@ -15,6 +15,8 @@
15
15
 
16
16
 
17
17
  # import models into model package
18
+ from cbbd.models.conference_history import ConferenceHistory
19
+ from cbbd.models.conference_history_teams_inner import ConferenceHistoryTeamsInner
18
20
  from cbbd.models.conference_info import ConferenceInfo
19
21
  from cbbd.models.game_box_score_players import GameBoxScorePlayers
20
22
  from cbbd.models.game_box_score_players_players_inner import GameBoxScorePlayersPlayersInner
@@ -31,6 +33,9 @@ from cbbd.models.play_type_info import PlayTypeInfo
31
33
  from cbbd.models.player_season_stats import PlayerSeasonStats
32
34
  from cbbd.models.season_type import SeasonType
33
35
  from cbbd.models.team_info import TeamInfo
36
+ from cbbd.models.team_roster import TeamRoster
37
+ from cbbd.models.team_roster_player import TeamRosterPlayer
38
+ from cbbd.models.team_roster_player_hometown import TeamRosterPlayerHometown
34
39
  from cbbd.models.team_season_stats import TeamSeasonStats
35
40
  from cbbd.models.team_season_unit_stats import TeamSeasonUnitStats
36
41
  from cbbd.models.team_season_unit_stats_field_goals import TeamSeasonUnitStatsFieldGoals
@@ -0,0 +1,90 @@
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.2.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
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+
22
+ from typing import List
23
+ from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
24
+ from cbbd.models.conference_history_teams_inner import ConferenceHistoryTeamsInner
25
+
26
+ class ConferenceHistory(BaseModel):
27
+ """
28
+ ConferenceHistory
29
+ """
30
+ id: StrictInt = Field(...)
31
+ source_id: StrictStr = Field(default=..., alias="sourceId")
32
+ name: StrictStr = Field(...)
33
+ abbreviation: StrictStr = Field(...)
34
+ short_name: StrictStr = Field(default=..., alias="shortName")
35
+ teams: conlist(ConferenceHistoryTeamsInner) = Field(...)
36
+ __properties = ["id", "sourceId", "name", "abbreviation", "shortName", "teams"]
37
+
38
+ class Config:
39
+ """Pydantic configuration"""
40
+ allow_population_by_field_name = True
41
+ validate_assignment = True
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.dict(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> ConferenceHistory:
53
+ """Create an instance of ConferenceHistory from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self):
57
+ """Returns the dictionary representation of the model using alias"""
58
+ _dict = self.dict(by_alias=True,
59
+ exclude={
60
+ },
61
+ exclude_none=True)
62
+ # override the default output from pydantic by calling `to_dict()` of each item in teams (list)
63
+ _items = []
64
+ if self.teams:
65
+ for _item in self.teams:
66
+ if _item:
67
+ _items.append(_item.to_dict())
68
+ _dict['teams'] = _items
69
+ return _dict
70
+
71
+ @classmethod
72
+ def from_dict(cls, obj: dict) -> ConferenceHistory:
73
+ """Create an instance of ConferenceHistory from a dict"""
74
+ if obj is None:
75
+ return None
76
+
77
+ if not isinstance(obj, dict):
78
+ return ConferenceHistory.parse_obj(obj)
79
+
80
+ _obj = ConferenceHistory.parse_obj({
81
+ "id": obj.get("id"),
82
+ "source_id": obj.get("sourceId"),
83
+ "name": obj.get("name"),
84
+ "abbreviation": obj.get("abbreviation"),
85
+ "short_name": obj.get("shortName"),
86
+ "teams": [ConferenceHistoryTeamsInner.from_dict(_item) for _item in obj.get("teams")] if obj.get("teams") is not None else None
87
+ })
88
+ return _obj
89
+
90
+
@@ -0,0 +1,92 @@
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.2.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
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+
22
+ from typing import Optional
23
+ from pydantic import BaseModel, Field, StrictInt, StrictStr
24
+
25
+ class ConferenceHistoryTeamsInner(BaseModel):
26
+ """
27
+ ConferenceHistoryTeamsInner
28
+ """
29
+ end_season: Optional[StrictInt] = Field(default=..., alias="endSeason")
30
+ start_season: StrictInt = Field(default=..., alias="startSeason")
31
+ mascot: Optional[StrictStr] = Field(...)
32
+ school: StrictStr = Field(...)
33
+ source_id: StrictStr = Field(default=..., alias="sourceId")
34
+ id: StrictInt = Field(...)
35
+ __properties = ["endSeason", "startSeason", "mascot", "school", "sourceId", "id"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.dict(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> ConferenceHistoryTeamsInner:
52
+ """Create an instance of ConferenceHistoryTeamsInner from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self):
56
+ """Returns the dictionary representation of the model using alias"""
57
+ _dict = self.dict(by_alias=True,
58
+ exclude={
59
+ },
60
+ exclude_none=True)
61
+ # set to None if end_season (nullable) is None
62
+ # and __fields_set__ contains the field
63
+ if self.end_season is None and "end_season" in self.__fields_set__:
64
+ _dict['endSeason'] = None
65
+
66
+ # set to None if mascot (nullable) is None
67
+ # and __fields_set__ contains the field
68
+ if self.mascot is None and "mascot" in self.__fields_set__:
69
+ _dict['mascot'] = None
70
+
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: dict) -> ConferenceHistoryTeamsInner:
75
+ """Create an instance of ConferenceHistoryTeamsInner from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return ConferenceHistoryTeamsInner.parse_obj(obj)
81
+
82
+ _obj = ConferenceHistoryTeamsInner.parse_obj({
83
+ "end_season": obj.get("endSeason"),
84
+ "start_season": obj.get("startSeason"),
85
+ "mascot": obj.get("mascot"),
86
+ "school": obj.get("school"),
87
+ "source_id": obj.get("sourceId"),
88
+ "id": obj.get("id")
89
+ })
90
+ return _obj
91
+
92
+