cbbd 1.7.3__py3-none-any.whl → 1.9.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- cbbd/__init__.py +6 -2
- cbbd/api/__init__.py +1 -0
- cbbd/api/conferences_api.py +1 -1
- cbbd/api/games_api.py +1 -1
- cbbd/api/lines_api.py +1 -1
- cbbd/api/plays_api.py +59 -27
- cbbd/api/rankings_api.py +228 -0
- cbbd/api/ratings_api.py +1 -1
- cbbd/api/stats_api.py +1 -1
- cbbd/api/teams_api.py +1 -1
- cbbd/api/venues_api.py +1 -1
- cbbd/api_client.py +2 -2
- cbbd/configuration.py +3 -3
- cbbd/exceptions.py +1 -1
- cbbd/models/__init__.py +4 -1
- cbbd/models/adjusted_efficiency_info.py +1 -1
- cbbd/models/conference_history.py +1 -1
- cbbd/models/conference_history_teams_inner.py +1 -1
- cbbd/models/conference_info.py +1 -1
- cbbd/models/game_box_score_players.py +1 -1
- cbbd/models/game_box_score_players_players_inner.py +1 -1
- cbbd/models/game_box_score_team.py +1 -1
- cbbd/models/game_box_score_team_stats.py +1 -1
- cbbd/models/game_box_score_team_stats_points.py +1 -1
- cbbd/models/game_info.py +1 -1
- cbbd/models/game_line_info.py +1 -1
- cbbd/models/game_lines.py +1 -1
- cbbd/models/game_media_info.py +1 -1
- cbbd/models/game_media_info_broadcasts_inner.py +1 -1
- cbbd/models/game_status.py +1 -1
- cbbd/models/line_provider_info.py +1 -1
- cbbd/models/play_info.py +14 -3
- cbbd/models/play_info_participants_inner.py +1 -1
- cbbd/models/play_type_info.py +1 -1
- cbbd/models/player_season_stats.py +1 -1
- cbbd/models/poll_team_info.py +118 -0
- cbbd/models/season_type.py +1 -1
- cbbd/models/shot_info.py +104 -0
- cbbd/models/shot_info_shooter.py +74 -0
- cbbd/models/srs_info.py +1 -1
- cbbd/models/team_info.py +1 -1
- cbbd/models/team_roster.py +1 -1
- cbbd/models/team_roster_player.py +1 -1
- cbbd/models/team_roster_player_hometown.py +1 -1
- cbbd/models/team_season_stats.py +1 -1
- cbbd/models/team_season_unit_stats.py +1 -1
- cbbd/models/team_season_unit_stats_field_goals.py +1 -1
- cbbd/models/team_season_unit_stats_fouls.py +1 -1
- cbbd/models/team_season_unit_stats_four_factors.py +1 -1
- cbbd/models/team_season_unit_stats_points.py +1 -1
- cbbd/models/team_season_unit_stats_rebounds.py +1 -1
- cbbd/models/team_season_unit_stats_turnovers.py +1 -1
- cbbd/models/venue_info.py +1 -1
- cbbd/rest.py +1 -1
- {cbbd-1.7.3.dist-info → cbbd-1.9.0.dist-info}/METADATA +1 -1
- cbbd-1.9.0.dist-info/RECORD +60 -0
- cbbd-1.7.3.dist-info/RECORD +0 -56
- {cbbd-1.7.3.dist-info → cbbd-1.9.0.dist-info}/WHEEL +0 -0
- {cbbd-1.7.3.dist-info → cbbd-1.9.0.dist-info}/top_level.txt +0 -0
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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
81
|
+
self.user_agent = 'OpenAPI-Generator/1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
380
|
-
"SDK Package Version: 1.
|
379
|
+
"Version of the API: 1.9.0\n"\
|
380
|
+
"SDK Package Version: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
9
|
+
The version of the OpenAPI document: 1.9.0
|
10
10
|
Contact: admin@collegefootballdata.com
|
11
11
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
12
12
|
|
@@ -35,7 +35,10 @@ from cbbd.models.play_info import PlayInfo
|
|
35
35
|
from cbbd.models.play_info_participants_inner import PlayInfoParticipantsInner
|
36
36
|
from cbbd.models.play_type_info import PlayTypeInfo
|
37
37
|
from cbbd.models.player_season_stats import PlayerSeasonStats
|
38
|
+
from cbbd.models.poll_team_info import PollTeamInfo
|
38
39
|
from cbbd.models.season_type import SeasonType
|
40
|
+
from cbbd.models.shot_info import ShotInfo
|
41
|
+
from cbbd.models.shot_info_shooter import ShotInfoShooter
|
39
42
|
from cbbd.models.srs_info import SrsInfo
|
40
43
|
from cbbd.models.team_info import TeamInfo
|
41
44
|
from cbbd.models.team_roster import TeamRoster
|
@@ -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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/conference_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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/game_line_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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/game_lines.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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/game_media_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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/game_status.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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/play_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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -23,6 +23,7 @@ from typing import List, Optional, Union
|
|
23
23
|
from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist
|
24
24
|
from cbbd.models.play_info_participants_inner import PlayInfoParticipantsInner
|
25
25
|
from cbbd.models.season_type import SeasonType
|
26
|
+
from cbbd.models.shot_info import ShotInfo
|
26
27
|
|
27
28
|
class PlayInfo(BaseModel):
|
28
29
|
"""
|
@@ -56,7 +57,8 @@ class PlayInfo(BaseModel):
|
|
56
57
|
wallclock: Optional[datetime] = Field(...)
|
57
58
|
play_text: Optional[StrictStr] = Field(default=..., alias="playText")
|
58
59
|
participants: conlist(PlayInfoParticipantsInner) = Field(...)
|
59
|
-
|
60
|
+
shot_info: Optional[ShotInfo] = Field(default=..., alias="shotInfo")
|
61
|
+
__properties = ["id", "sourceId", "gameId", "gameSourceId", "gameStartDate", "season", "seasonType", "gameType", "playType", "isHomeTeam", "teamId", "team", "conference", "opponentId", "opponent", "opponentConference", "period", "clock", "secondsRemaining", "homeScore", "awayScore", "homeWinProbability", "scoringPlay", "shootingPlay", "scoreValue", "wallclock", "playText", "participants", "shotInfo"]
|
60
62
|
|
61
63
|
class Config:
|
62
64
|
"""Pydantic configuration"""
|
@@ -89,6 +91,9 @@ class PlayInfo(BaseModel):
|
|
89
91
|
if _item:
|
90
92
|
_items.append(_item.to_dict())
|
91
93
|
_dict['participants'] = _items
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of shot_info
|
95
|
+
if self.shot_info:
|
96
|
+
_dict['shotInfo'] = self.shot_info.to_dict()
|
92
97
|
# set to None if is_home_team (nullable) is None
|
93
98
|
# and __fields_set__ contains the field
|
94
99
|
if self.is_home_team is None and "is_home_team" in self.__fields_set__:
|
@@ -154,6 +159,11 @@ class PlayInfo(BaseModel):
|
|
154
159
|
if self.play_text is None and "play_text" in self.__fields_set__:
|
155
160
|
_dict['playText'] = None
|
156
161
|
|
162
|
+
# set to None if shot_info (nullable) is None
|
163
|
+
# and __fields_set__ contains the field
|
164
|
+
if self.shot_info is None and "shot_info" in self.__fields_set__:
|
165
|
+
_dict['shotInfo'] = None
|
166
|
+
|
157
167
|
return _dict
|
158
168
|
|
159
169
|
@classmethod
|
@@ -193,7 +203,8 @@ class PlayInfo(BaseModel):
|
|
193
203
|
"score_value": obj.get("scoreValue"),
|
194
204
|
"wallclock": obj.get("wallclock"),
|
195
205
|
"play_text": obj.get("playText"),
|
196
|
-
"participants": [PlayInfoParticipantsInner.from_dict(_item) for _item in obj.get("participants")] if obj.get("participants") is not None else None
|
206
|
+
"participants": [PlayInfoParticipantsInner.from_dict(_item) for _item in obj.get("participants")] if obj.get("participants") is not None else None,
|
207
|
+
"shot_info": ShotInfo.from_dict(obj.get("shotInfo")) if obj.get("shotInfo") is not None else None
|
197
208
|
})
|
198
209
|
return _obj
|
199
210
|
|
@@ -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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/play_type_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.
|
8
|
+
The version of the OpenAPI document: 1.9.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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -0,0 +1,118 @@
|
|
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.9.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
|
+
from datetime import datetime
|
22
|
+
from typing import Optional, Union
|
23
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr
|
24
|
+
from cbbd.models.season_type import SeasonType
|
25
|
+
|
26
|
+
class PollTeamInfo(BaseModel):
|
27
|
+
"""
|
28
|
+
PollTeamInfo
|
29
|
+
"""
|
30
|
+
season: StrictInt = Field(...)
|
31
|
+
season_type: SeasonType = Field(default=..., alias="seasonType")
|
32
|
+
week: StrictInt = Field(...)
|
33
|
+
poll_date: Optional[datetime] = Field(default=..., alias="pollDate")
|
34
|
+
poll_type: StrictStr = Field(default=..., alias="pollType")
|
35
|
+
team_id: Union[StrictFloat, StrictInt] = Field(default=..., alias="teamId")
|
36
|
+
team: StrictStr = Field(...)
|
37
|
+
conference: Optional[StrictStr] = Field(...)
|
38
|
+
ranking: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
39
|
+
points: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
40
|
+
first_place_votes: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="firstPlaceVotes")
|
41
|
+
__properties = ["season", "seasonType", "week", "pollDate", "pollType", "teamId", "team", "conference", "ranking", "points", "firstPlaceVotes"]
|
42
|
+
|
43
|
+
class Config:
|
44
|
+
"""Pydantic configuration"""
|
45
|
+
allow_population_by_field_name = True
|
46
|
+
validate_assignment = True
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> PollTeamInfo:
|
58
|
+
"""Create an instance of PollTeamInfo from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self):
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
63
|
+
_dict = self.dict(by_alias=True,
|
64
|
+
exclude={
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# set to None if poll_date (nullable) is None
|
68
|
+
# and __fields_set__ contains the field
|
69
|
+
if self.poll_date is None and "poll_date" in self.__fields_set__:
|
70
|
+
_dict['pollDate'] = None
|
71
|
+
|
72
|
+
# set to None if conference (nullable) is None
|
73
|
+
# and __fields_set__ contains the field
|
74
|
+
if self.conference is None and "conference" in self.__fields_set__:
|
75
|
+
_dict['conference'] = None
|
76
|
+
|
77
|
+
# set to None if ranking (nullable) is None
|
78
|
+
# and __fields_set__ contains the field
|
79
|
+
if self.ranking is None and "ranking" in self.__fields_set__:
|
80
|
+
_dict['ranking'] = None
|
81
|
+
|
82
|
+
# set to None if points (nullable) is None
|
83
|
+
# and __fields_set__ contains the field
|
84
|
+
if self.points is None and "points" in self.__fields_set__:
|
85
|
+
_dict['points'] = None
|
86
|
+
|
87
|
+
# set to None if first_place_votes (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.first_place_votes is None and "first_place_votes" in self.__fields_set__:
|
90
|
+
_dict['firstPlaceVotes'] = None
|
91
|
+
|
92
|
+
return _dict
|
93
|
+
|
94
|
+
@classmethod
|
95
|
+
def from_dict(cls, obj: dict) -> PollTeamInfo:
|
96
|
+
"""Create an instance of PollTeamInfo from a dict"""
|
97
|
+
if obj is None:
|
98
|
+
return None
|
99
|
+
|
100
|
+
if not isinstance(obj, dict):
|
101
|
+
return PollTeamInfo.parse_obj(obj)
|
102
|
+
|
103
|
+
_obj = PollTeamInfo.parse_obj({
|
104
|
+
"season": obj.get("season"),
|
105
|
+
"season_type": obj.get("seasonType"),
|
106
|
+
"week": obj.get("week"),
|
107
|
+
"poll_date": obj.get("pollDate"),
|
108
|
+
"poll_type": obj.get("pollType"),
|
109
|
+
"team_id": obj.get("teamId"),
|
110
|
+
"team": obj.get("team"),
|
111
|
+
"conference": obj.get("conference"),
|
112
|
+
"ranking": obj.get("ranking"),
|
113
|
+
"points": obj.get("points"),
|
114
|
+
"first_place_votes": obj.get("firstPlaceVotes")
|
115
|
+
})
|
116
|
+
return _obj
|
117
|
+
|
118
|
+
|
cbbd/models/season_type.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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/shot_info.py
ADDED
@@ -0,0 +1,104 @@
|
|
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.9.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, StrictBool, StrictStr, validator
|
24
|
+
from cbbd.models.shot_info_shooter import ShotInfoShooter
|
25
|
+
|
26
|
+
class ShotInfo(BaseModel):
|
27
|
+
"""
|
28
|
+
ShotInfo
|
29
|
+
"""
|
30
|
+
shooter: Optional[ShotInfoShooter] = Field(...)
|
31
|
+
made: StrictBool = Field(...)
|
32
|
+
range: StrictStr = Field(...)
|
33
|
+
assisted: StrictBool = Field(...)
|
34
|
+
assisted_by: Optional[ShotInfoShooter] = Field(default=..., alias="assistedBy")
|
35
|
+
__properties = ["shooter", "made", "range", "assisted", "assistedBy"]
|
36
|
+
|
37
|
+
@validator('range')
|
38
|
+
def range_validate_enum(cls, value):
|
39
|
+
"""Validates the enum"""
|
40
|
+
if value not in ('rim', 'jumper', 'three_pointer', 'free_throw',):
|
41
|
+
raise ValueError("must be one of enum values ('rim', 'jumper', 'three_pointer', 'free_throw')")
|
42
|
+
return value
|
43
|
+
|
44
|
+
class Config:
|
45
|
+
"""Pydantic configuration"""
|
46
|
+
allow_population_by_field_name = True
|
47
|
+
validate_assignment = True
|
48
|
+
|
49
|
+
def to_str(self) -> str:
|
50
|
+
"""Returns the string representation of the model using alias"""
|
51
|
+
return pprint.pformat(self.dict(by_alias=True))
|
52
|
+
|
53
|
+
def to_json(self) -> str:
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
55
|
+
return json.dumps(self.to_dict())
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_json(cls, json_str: str) -> ShotInfo:
|
59
|
+
"""Create an instance of ShotInfo from a JSON string"""
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
61
|
+
|
62
|
+
def to_dict(self):
|
63
|
+
"""Returns the dictionary representation of the model using alias"""
|
64
|
+
_dict = self.dict(by_alias=True,
|
65
|
+
exclude={
|
66
|
+
},
|
67
|
+
exclude_none=True)
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of shooter
|
69
|
+
if self.shooter:
|
70
|
+
_dict['shooter'] = self.shooter.to_dict()
|
71
|
+
# override the default output from pydantic by calling `to_dict()` of assisted_by
|
72
|
+
if self.assisted_by:
|
73
|
+
_dict['assistedBy'] = self.assisted_by.to_dict()
|
74
|
+
# set to None if shooter (nullable) is None
|
75
|
+
# and __fields_set__ contains the field
|
76
|
+
if self.shooter is None and "shooter" in self.__fields_set__:
|
77
|
+
_dict['shooter'] = None
|
78
|
+
|
79
|
+
# set to None if assisted_by (nullable) is None
|
80
|
+
# and __fields_set__ contains the field
|
81
|
+
if self.assisted_by is None and "assisted_by" in self.__fields_set__:
|
82
|
+
_dict['assistedBy'] = None
|
83
|
+
|
84
|
+
return _dict
|
85
|
+
|
86
|
+
@classmethod
|
87
|
+
def from_dict(cls, obj: dict) -> ShotInfo:
|
88
|
+
"""Create an instance of ShotInfo from a dict"""
|
89
|
+
if obj is None:
|
90
|
+
return None
|
91
|
+
|
92
|
+
if not isinstance(obj, dict):
|
93
|
+
return ShotInfo.parse_obj(obj)
|
94
|
+
|
95
|
+
_obj = ShotInfo.parse_obj({
|
96
|
+
"shooter": ShotInfoShooter.from_dict(obj.get("shooter")) if obj.get("shooter") is not None else None,
|
97
|
+
"made": obj.get("made"),
|
98
|
+
"range": obj.get("range"),
|
99
|
+
"assisted": obj.get("assisted"),
|
100
|
+
"assisted_by": ShotInfoShooter.from_dict(obj.get("assistedBy")) if obj.get("assistedBy") is not None else None
|
101
|
+
})
|
102
|
+
return _obj
|
103
|
+
|
104
|
+
|
@@ -0,0 +1,74 @@
|
|
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.9.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
|
+
|
23
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr
|
24
|
+
|
25
|
+
class ShotInfoShooter(BaseModel):
|
26
|
+
"""
|
27
|
+
ShotInfoShooter
|
28
|
+
"""
|
29
|
+
name: StrictStr = Field(...)
|
30
|
+
id: StrictInt = Field(...)
|
31
|
+
__properties = ["name", "id"]
|
32
|
+
|
33
|
+
class Config:
|
34
|
+
"""Pydantic configuration"""
|
35
|
+
allow_population_by_field_name = True
|
36
|
+
validate_assignment = True
|
37
|
+
|
38
|
+
def to_str(self) -> str:
|
39
|
+
"""Returns the string representation of the model using alias"""
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
41
|
+
|
42
|
+
def to_json(self) -> str:
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
44
|
+
return json.dumps(self.to_dict())
|
45
|
+
|
46
|
+
@classmethod
|
47
|
+
def from_json(cls, json_str: str) -> ShotInfoShooter:
|
48
|
+
"""Create an instance of ShotInfoShooter from a JSON string"""
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
50
|
+
|
51
|
+
def to_dict(self):
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
53
|
+
_dict = self.dict(by_alias=True,
|
54
|
+
exclude={
|
55
|
+
},
|
56
|
+
exclude_none=True)
|
57
|
+
return _dict
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_dict(cls, obj: dict) -> ShotInfoShooter:
|
61
|
+
"""Create an instance of ShotInfoShooter from a dict"""
|
62
|
+
if obj is None:
|
63
|
+
return None
|
64
|
+
|
65
|
+
if not isinstance(obj, dict):
|
66
|
+
return ShotInfoShooter.parse_obj(obj)
|
67
|
+
|
68
|
+
_obj = ShotInfoShooter.parse_obj({
|
69
|
+
"name": obj.get("name"),
|
70
|
+
"id": obj.get("id")
|
71
|
+
})
|
72
|
+
return _obj
|
73
|
+
|
74
|
+
|
cbbd/models/srs_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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
cbbd/models/team_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.
|
8
|
+
The version of the OpenAPI document: 1.9.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|