cbbd 1.1.3__py3-none-any.whl → 1.3.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 (52) hide show
  1. cbbd/__init__.py +11 -2
  2. cbbd/api/__init__.py +1 -0
  3. cbbd/api/conferences_api.py +146 -2
  4. cbbd/api/games_api.py +1 -1
  5. cbbd/api/lines_api.py +358 -0
  6. cbbd/api/plays_api.py +1 -1
  7. cbbd/api/stats_api.py +1 -1
  8. cbbd/api/teams_api.py +150 -1
  9. cbbd/api/venues_api.py +1 -1
  10. cbbd/api_client.py +2 -2
  11. cbbd/configuration.py +3 -3
  12. cbbd/exceptions.py +1 -1
  13. cbbd/models/__init__.py +9 -1
  14. cbbd/models/conference_history.py +90 -0
  15. cbbd/models/conference_history_teams_inner.py +92 -0
  16. cbbd/models/conference_info.py +1 -1
  17. cbbd/models/game_box_score_players.py +1 -1
  18. cbbd/models/game_box_score_players_players_inner.py +1 -1
  19. cbbd/models/game_box_score_team.py +1 -1
  20. cbbd/models/game_box_score_team_stats.py +1 -1
  21. cbbd/models/game_box_score_team_stats_points.py +1 -1
  22. cbbd/models/game_info.py +1 -1
  23. cbbd/models/game_line_info.py +114 -0
  24. cbbd/models/game_lines.py +125 -0
  25. cbbd/models/game_media_info.py +1 -1
  26. cbbd/models/game_media_info_broadcasts_inner.py +1 -1
  27. cbbd/models/game_status.py +1 -1
  28. cbbd/models/line_provider_info.py +74 -0
  29. cbbd/models/play_info.py +1 -1
  30. cbbd/models/play_info_participants_inner.py +1 -1
  31. cbbd/models/play_type_info.py +1 -1
  32. cbbd/models/player_season_stats.py +1 -1
  33. cbbd/models/season_type.py +1 -1
  34. cbbd/models/team_info.py +1 -1
  35. cbbd/models/team_roster.py +95 -0
  36. cbbd/models/team_roster_player.py +135 -0
  37. cbbd/models/team_roster_player_hometown.py +91 -0
  38. cbbd/models/team_season_stats.py +1 -1
  39. cbbd/models/team_season_unit_stats.py +1 -1
  40. cbbd/models/team_season_unit_stats_field_goals.py +1 -1
  41. cbbd/models/team_season_unit_stats_fouls.py +1 -1
  42. cbbd/models/team_season_unit_stats_four_factors.py +1 -1
  43. cbbd/models/team_season_unit_stats_points.py +1 -1
  44. cbbd/models/team_season_unit_stats_rebounds.py +1 -1
  45. cbbd/models/team_season_unit_stats_turnovers.py +1 -1
  46. cbbd/models/venue_info.py +1 -1
  47. cbbd/rest.py +1 -1
  48. {cbbd-1.1.3.dist-info → cbbd-1.3.0.dist-info}/METADATA +1 -1
  49. cbbd-1.3.0.dist-info/RECORD +53 -0
  50. cbbd-1.1.3.dist-info/RECORD +0 -44
  51. {cbbd-1.1.3.dist-info → cbbd-1.3.0.dist-info}/WHEEL +0 -0
  52. {cbbd-1.1.3.dist-info → cbbd-1.3.0.dist-info}/top_level.txt +0 -0
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.3.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.3.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.3.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.3.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.3.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.3.0\n"\
380
+ "SDK Package Version: 1.3.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.3.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.3.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
@@ -22,15 +24,21 @@ from cbbd.models.game_box_score_team import GameBoxScoreTeam
22
24
  from cbbd.models.game_box_score_team_stats import GameBoxScoreTeamStats
23
25
  from cbbd.models.game_box_score_team_stats_points import GameBoxScoreTeamStatsPoints
24
26
  from cbbd.models.game_info import GameInfo
27
+ from cbbd.models.game_line_info import GameLineInfo
28
+ from cbbd.models.game_lines import GameLines
25
29
  from cbbd.models.game_media_info import GameMediaInfo
26
30
  from cbbd.models.game_media_info_broadcasts_inner import GameMediaInfoBroadcastsInner
27
31
  from cbbd.models.game_status import GameStatus
32
+ from cbbd.models.line_provider_info import LineProviderInfo
28
33
  from cbbd.models.play_info import PlayInfo
29
34
  from cbbd.models.play_info_participants_inner import PlayInfoParticipantsInner
30
35
  from cbbd.models.play_type_info import PlayTypeInfo
31
36
  from cbbd.models.player_season_stats import PlayerSeasonStats
32
37
  from cbbd.models.season_type import SeasonType
33
38
  from cbbd.models.team_info import TeamInfo
39
+ from cbbd.models.team_roster import TeamRoster
40
+ from cbbd.models.team_roster_player import TeamRosterPlayer
41
+ from cbbd.models.team_roster_player_hometown import TeamRosterPlayerHometown
34
42
  from cbbd.models.team_season_stats import TeamSeasonStats
35
43
  from cbbd.models.team_season_unit_stats import TeamSeasonUnitStats
36
44
  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.3.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.3.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
+
@@ -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.3.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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.3.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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.3.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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.3.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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.3.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -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.3.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
cbbd/models/game_info.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.3.0
9
9
  Contact: admin@collegefootballdata.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -0,0 +1,114 @@
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.3.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, Union
23
+ from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr
24
+
25
+ class GameLineInfo(BaseModel):
26
+ """
27
+ GameLineInfo
28
+ """
29
+ provider: StrictStr = Field(...)
30
+ spread: Optional[Union[StrictFloat, StrictInt]] = Field(...)
31
+ over_under: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="overUnder")
32
+ home_moneyline: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="homeMoneyline")
33
+ away_moneyline: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="awayMoneyline")
34
+ spread_open: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="spreadOpen")
35
+ over_under_open: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="overUnderOpen")
36
+ __properties = ["provider", "spread", "overUnder", "homeMoneyline", "awayMoneyline", "spreadOpen", "overUnderOpen"]
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) -> GameLineInfo:
53
+ """Create an instance of GameLineInfo 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
+ # set to None if spread (nullable) is None
63
+ # and __fields_set__ contains the field
64
+ if self.spread is None and "spread" in self.__fields_set__:
65
+ _dict['spread'] = None
66
+
67
+ # set to None if over_under (nullable) is None
68
+ # and __fields_set__ contains the field
69
+ if self.over_under is None and "over_under" in self.__fields_set__:
70
+ _dict['overUnder'] = None
71
+
72
+ # set to None if home_moneyline (nullable) is None
73
+ # and __fields_set__ contains the field
74
+ if self.home_moneyline is None and "home_moneyline" in self.__fields_set__:
75
+ _dict['homeMoneyline'] = None
76
+
77
+ # set to None if away_moneyline (nullable) is None
78
+ # and __fields_set__ contains the field
79
+ if self.away_moneyline is None and "away_moneyline" in self.__fields_set__:
80
+ _dict['awayMoneyline'] = None
81
+
82
+ # set to None if spread_open (nullable) is None
83
+ # and __fields_set__ contains the field
84
+ if self.spread_open is None and "spread_open" in self.__fields_set__:
85
+ _dict['spreadOpen'] = None
86
+
87
+ # set to None if over_under_open (nullable) is None
88
+ # and __fields_set__ contains the field
89
+ if self.over_under_open is None and "over_under_open" in self.__fields_set__:
90
+ _dict['overUnderOpen'] = None
91
+
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: dict) -> GameLineInfo:
96
+ """Create an instance of GameLineInfo from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return GameLineInfo.parse_obj(obj)
102
+
103
+ _obj = GameLineInfo.parse_obj({
104
+ "provider": obj.get("provider"),
105
+ "spread": obj.get("spread"),
106
+ "over_under": obj.get("overUnder"),
107
+ "home_moneyline": obj.get("homeMoneyline"),
108
+ "away_moneyline": obj.get("awayMoneyline"),
109
+ "spread_open": obj.get("spreadOpen"),
110
+ "over_under_open": obj.get("overUnderOpen")
111
+ })
112
+ return _obj
113
+
114
+