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.
- cbbd/__init__.py +64 -0
- cbbd/api/__init__.py +10 -0
- cbbd/api/conferences_api.py +176 -0
- cbbd/api/games_api.py +806 -0
- cbbd/api/plays_api.py +761 -0
- cbbd/api/stats_api.py +423 -0
- cbbd/api/teams_api.py +195 -0
- cbbd/api/venues_api.py +176 -0
- cbbd/api_client.py +767 -0
- cbbd/api_response.py +25 -0
- cbbd/configuration.py +443 -0
- cbbd/exceptions.py +167 -0
- cbbd/models/__init__.py +42 -0
- cbbd/models/conference_info.py +80 -0
- cbbd/models/game_box_score_players.py +147 -0
- cbbd/models/game_box_score_players_players_inner.py +238 -0
- cbbd/models/game_box_score_team.py +148 -0
- cbbd/models/game_box_score_team_stats.py +170 -0
- cbbd/models/game_box_score_team_stats_points.py +112 -0
- cbbd/models/game_info.py +212 -0
- cbbd/models/game_media_info.py +133 -0
- cbbd/models/game_media_info_broadcasts_inner.py +74 -0
- cbbd/models/game_status.py +44 -0
- cbbd/models/play_info.py +193 -0
- cbbd/models/play_info_participants_inner.py +74 -0
- cbbd/models/play_type_info.py +74 -0
- cbbd/models/player_season_stats.py +231 -0
- cbbd/models/season_type.py +42 -0
- cbbd/models/team_info.py +160 -0
- cbbd/models/team_season_stats.py +112 -0
- cbbd/models/team_season_unit_stats.py +163 -0
- cbbd/models/team_season_unit_stats_field_goals.py +91 -0
- cbbd/models/team_season_unit_stats_fouls.py +91 -0
- cbbd/models/team_season_unit_stats_four_factors.py +98 -0
- cbbd/models/team_season_unit_stats_points.py +98 -0
- cbbd/models/team_season_unit_stats_rebounds.py +91 -0
- cbbd/models/team_season_unit_stats_turnovers.py +84 -0
- cbbd/models/venue_info.py +102 -0
- cbbd/py.typed +0 -0
- cbbd/rest.py +330 -0
- cbbd-1.1.0a1.dist-info/METADATA +24 -0
- cbbd-1.1.0a1.dist-info/RECORD +44 -0
- cbbd-1.1.0a1.dist-info/WHEEL +5 -0
- cbbd-1.1.0a1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,163 @@
|
|
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
|
+
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
|
24
|
+
from cbbd.models.team_season_unit_stats_field_goals import TeamSeasonUnitStatsFieldGoals
|
25
|
+
from cbbd.models.team_season_unit_stats_fouls import TeamSeasonUnitStatsFouls
|
26
|
+
from cbbd.models.team_season_unit_stats_four_factors import TeamSeasonUnitStatsFourFactors
|
27
|
+
from cbbd.models.team_season_unit_stats_points import TeamSeasonUnitStatsPoints
|
28
|
+
from cbbd.models.team_season_unit_stats_rebounds import TeamSeasonUnitStatsRebounds
|
29
|
+
from cbbd.models.team_season_unit_stats_turnovers import TeamSeasonUnitStatsTurnovers
|
30
|
+
|
31
|
+
class TeamSeasonUnitStats(BaseModel):
|
32
|
+
"""
|
33
|
+
TeamSeasonUnitStats
|
34
|
+
"""
|
35
|
+
field_goals: TeamSeasonUnitStatsFieldGoals = Field(default=..., alias="fieldGoals")
|
36
|
+
two_point_field_goals: TeamSeasonUnitStatsFieldGoals = Field(default=..., alias="twoPointFieldGoals")
|
37
|
+
three_point_field_goals: TeamSeasonUnitStatsFieldGoals = Field(default=..., alias="threePointFieldGoals")
|
38
|
+
free_throws: TeamSeasonUnitStatsFieldGoals = Field(default=..., alias="freeThrows")
|
39
|
+
rebounds: TeamSeasonUnitStatsRebounds = Field(...)
|
40
|
+
turnovers: TeamSeasonUnitStatsTurnovers = Field(...)
|
41
|
+
fouls: TeamSeasonUnitStatsFouls = Field(...)
|
42
|
+
points: TeamSeasonUnitStatsPoints = Field(...)
|
43
|
+
four_factors: TeamSeasonUnitStatsFourFactors = Field(default=..., alias="fourFactors")
|
44
|
+
assists: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
45
|
+
blocks: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
46
|
+
steals: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
47
|
+
possessions: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
48
|
+
rating: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
49
|
+
true_shooting: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="trueShooting")
|
50
|
+
__properties = ["fieldGoals", "twoPointFieldGoals", "threePointFieldGoals", "freeThrows", "rebounds", "turnovers", "fouls", "points", "fourFactors", "assists", "blocks", "steals", "possessions", "rating", "trueShooting"]
|
51
|
+
|
52
|
+
class Config:
|
53
|
+
"""Pydantic configuration"""
|
54
|
+
allow_population_by_field_name = True
|
55
|
+
validate_assignment = True
|
56
|
+
|
57
|
+
def to_str(self) -> str:
|
58
|
+
"""Returns the string representation of the model using alias"""
|
59
|
+
return pprint.pformat(self.dict(by_alias=True))
|
60
|
+
|
61
|
+
def to_json(self) -> str:
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
63
|
+
return json.dumps(self.to_dict())
|
64
|
+
|
65
|
+
@classmethod
|
66
|
+
def from_json(cls, json_str: str) -> TeamSeasonUnitStats:
|
67
|
+
"""Create an instance of TeamSeasonUnitStats from a JSON string"""
|
68
|
+
return cls.from_dict(json.loads(json_str))
|
69
|
+
|
70
|
+
def to_dict(self):
|
71
|
+
"""Returns the dictionary representation of the model using alias"""
|
72
|
+
_dict = self.dict(by_alias=True,
|
73
|
+
exclude={
|
74
|
+
},
|
75
|
+
exclude_none=True)
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of field_goals
|
77
|
+
if self.field_goals:
|
78
|
+
_dict['fieldGoals'] = self.field_goals.to_dict()
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of two_point_field_goals
|
80
|
+
if self.two_point_field_goals:
|
81
|
+
_dict['twoPointFieldGoals'] = self.two_point_field_goals.to_dict()
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of three_point_field_goals
|
83
|
+
if self.three_point_field_goals:
|
84
|
+
_dict['threePointFieldGoals'] = self.three_point_field_goals.to_dict()
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of free_throws
|
86
|
+
if self.free_throws:
|
87
|
+
_dict['freeThrows'] = self.free_throws.to_dict()
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of rebounds
|
89
|
+
if self.rebounds:
|
90
|
+
_dict['rebounds'] = self.rebounds.to_dict()
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of turnovers
|
92
|
+
if self.turnovers:
|
93
|
+
_dict['turnovers'] = self.turnovers.to_dict()
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of fouls
|
95
|
+
if self.fouls:
|
96
|
+
_dict['fouls'] = self.fouls.to_dict()
|
97
|
+
# override the default output from pydantic by calling `to_dict()` of points
|
98
|
+
if self.points:
|
99
|
+
_dict['points'] = self.points.to_dict()
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of four_factors
|
101
|
+
if self.four_factors:
|
102
|
+
_dict['fourFactors'] = self.four_factors.to_dict()
|
103
|
+
# set to None if assists (nullable) is None
|
104
|
+
# and __fields_set__ contains the field
|
105
|
+
if self.assists is None and "assists" in self.__fields_set__:
|
106
|
+
_dict['assists'] = None
|
107
|
+
|
108
|
+
# set to None if blocks (nullable) is None
|
109
|
+
# and __fields_set__ contains the field
|
110
|
+
if self.blocks is None and "blocks" in self.__fields_set__:
|
111
|
+
_dict['blocks'] = None
|
112
|
+
|
113
|
+
# set to None if steals (nullable) is None
|
114
|
+
# and __fields_set__ contains the field
|
115
|
+
if self.steals is None and "steals" in self.__fields_set__:
|
116
|
+
_dict['steals'] = None
|
117
|
+
|
118
|
+
# set to None if possessions (nullable) is None
|
119
|
+
# and __fields_set__ contains the field
|
120
|
+
if self.possessions is None and "possessions" in self.__fields_set__:
|
121
|
+
_dict['possessions'] = None
|
122
|
+
|
123
|
+
# set to None if rating (nullable) is None
|
124
|
+
# and __fields_set__ contains the field
|
125
|
+
if self.rating is None and "rating" in self.__fields_set__:
|
126
|
+
_dict['rating'] = None
|
127
|
+
|
128
|
+
# set to None if true_shooting (nullable) is None
|
129
|
+
# and __fields_set__ contains the field
|
130
|
+
if self.true_shooting is None and "true_shooting" in self.__fields_set__:
|
131
|
+
_dict['trueShooting'] = None
|
132
|
+
|
133
|
+
return _dict
|
134
|
+
|
135
|
+
@classmethod
|
136
|
+
def from_dict(cls, obj: dict) -> TeamSeasonUnitStats:
|
137
|
+
"""Create an instance of TeamSeasonUnitStats from a dict"""
|
138
|
+
if obj is None:
|
139
|
+
return None
|
140
|
+
|
141
|
+
if not isinstance(obj, dict):
|
142
|
+
return TeamSeasonUnitStats.parse_obj(obj)
|
143
|
+
|
144
|
+
_obj = TeamSeasonUnitStats.parse_obj({
|
145
|
+
"field_goals": TeamSeasonUnitStatsFieldGoals.from_dict(obj.get("fieldGoals")) if obj.get("fieldGoals") is not None else None,
|
146
|
+
"two_point_field_goals": TeamSeasonUnitStatsFieldGoals.from_dict(obj.get("twoPointFieldGoals")) if obj.get("twoPointFieldGoals") is not None else None,
|
147
|
+
"three_point_field_goals": TeamSeasonUnitStatsFieldGoals.from_dict(obj.get("threePointFieldGoals")) if obj.get("threePointFieldGoals") is not None else None,
|
148
|
+
"free_throws": TeamSeasonUnitStatsFieldGoals.from_dict(obj.get("freeThrows")) if obj.get("freeThrows") is not None else None,
|
149
|
+
"rebounds": TeamSeasonUnitStatsRebounds.from_dict(obj.get("rebounds")) if obj.get("rebounds") is not None else None,
|
150
|
+
"turnovers": TeamSeasonUnitStatsTurnovers.from_dict(obj.get("turnovers")) if obj.get("turnovers") is not None else None,
|
151
|
+
"fouls": TeamSeasonUnitStatsFouls.from_dict(obj.get("fouls")) if obj.get("fouls") is not None else None,
|
152
|
+
"points": TeamSeasonUnitStatsPoints.from_dict(obj.get("points")) if obj.get("points") is not None else None,
|
153
|
+
"four_factors": TeamSeasonUnitStatsFourFactors.from_dict(obj.get("fourFactors")) if obj.get("fourFactors") is not None else None,
|
154
|
+
"assists": obj.get("assists"),
|
155
|
+
"blocks": obj.get("blocks"),
|
156
|
+
"steals": obj.get("steals"),
|
157
|
+
"possessions": obj.get("possessions"),
|
158
|
+
"rating": obj.get("rating"),
|
159
|
+
"true_shooting": obj.get("trueShooting")
|
160
|
+
})
|
161
|
+
return _obj
|
162
|
+
|
163
|
+
|
@@ -0,0 +1,91 @@
|
|
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
|
+
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
|
24
|
+
|
25
|
+
class TeamSeasonUnitStatsFieldGoals(BaseModel):
|
26
|
+
"""
|
27
|
+
TeamSeasonUnitStatsFieldGoals
|
28
|
+
"""
|
29
|
+
pct: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
30
|
+
attempted: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
31
|
+
made: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
32
|
+
__properties = ["pct", "attempted", "made"]
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
"""Pydantic configuration"""
|
36
|
+
allow_population_by_field_name = True
|
37
|
+
validate_assignment = True
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
return json.dumps(self.to_dict())
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_json(cls, json_str: str) -> TeamSeasonUnitStatsFieldGoals:
|
49
|
+
"""Create an instance of TeamSeasonUnitStatsFieldGoals from a JSON string"""
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
51
|
+
|
52
|
+
def to_dict(self):
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
54
|
+
_dict = self.dict(by_alias=True,
|
55
|
+
exclude={
|
56
|
+
},
|
57
|
+
exclude_none=True)
|
58
|
+
# set to None if pct (nullable) is None
|
59
|
+
# and __fields_set__ contains the field
|
60
|
+
if self.pct is None and "pct" in self.__fields_set__:
|
61
|
+
_dict['pct'] = None
|
62
|
+
|
63
|
+
# set to None if attempted (nullable) is None
|
64
|
+
# and __fields_set__ contains the field
|
65
|
+
if self.attempted is None and "attempted" in self.__fields_set__:
|
66
|
+
_dict['attempted'] = None
|
67
|
+
|
68
|
+
# set to None if made (nullable) is None
|
69
|
+
# and __fields_set__ contains the field
|
70
|
+
if self.made is None and "made" in self.__fields_set__:
|
71
|
+
_dict['made'] = None
|
72
|
+
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: dict) -> TeamSeasonUnitStatsFieldGoals:
|
77
|
+
"""Create an instance of TeamSeasonUnitStatsFieldGoals from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return TeamSeasonUnitStatsFieldGoals.parse_obj(obj)
|
83
|
+
|
84
|
+
_obj = TeamSeasonUnitStatsFieldGoals.parse_obj({
|
85
|
+
"pct": obj.get("pct"),
|
86
|
+
"attempted": obj.get("attempted"),
|
87
|
+
"made": obj.get("made")
|
88
|
+
})
|
89
|
+
return _obj
|
90
|
+
|
91
|
+
|
@@ -0,0 +1,91 @@
|
|
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
|
+
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
|
24
|
+
|
25
|
+
class TeamSeasonUnitStatsFouls(BaseModel):
|
26
|
+
"""
|
27
|
+
TeamSeasonUnitStatsFouls
|
28
|
+
"""
|
29
|
+
flagrant: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
30
|
+
technical: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
31
|
+
total: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
32
|
+
__properties = ["flagrant", "technical", "total"]
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
"""Pydantic configuration"""
|
36
|
+
allow_population_by_field_name = True
|
37
|
+
validate_assignment = True
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
return json.dumps(self.to_dict())
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_json(cls, json_str: str) -> TeamSeasonUnitStatsFouls:
|
49
|
+
"""Create an instance of TeamSeasonUnitStatsFouls from a JSON string"""
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
51
|
+
|
52
|
+
def to_dict(self):
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
54
|
+
_dict = self.dict(by_alias=True,
|
55
|
+
exclude={
|
56
|
+
},
|
57
|
+
exclude_none=True)
|
58
|
+
# set to None if flagrant (nullable) is None
|
59
|
+
# and __fields_set__ contains the field
|
60
|
+
if self.flagrant is None and "flagrant" in self.__fields_set__:
|
61
|
+
_dict['flagrant'] = None
|
62
|
+
|
63
|
+
# set to None if technical (nullable) is None
|
64
|
+
# and __fields_set__ contains the field
|
65
|
+
if self.technical is None and "technical" in self.__fields_set__:
|
66
|
+
_dict['technical'] = None
|
67
|
+
|
68
|
+
# set to None if total (nullable) is None
|
69
|
+
# and __fields_set__ contains the field
|
70
|
+
if self.total is None and "total" in self.__fields_set__:
|
71
|
+
_dict['total'] = None
|
72
|
+
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: dict) -> TeamSeasonUnitStatsFouls:
|
77
|
+
"""Create an instance of TeamSeasonUnitStatsFouls from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return TeamSeasonUnitStatsFouls.parse_obj(obj)
|
83
|
+
|
84
|
+
_obj = TeamSeasonUnitStatsFouls.parse_obj({
|
85
|
+
"flagrant": obj.get("flagrant"),
|
86
|
+
"technical": obj.get("technical"),
|
87
|
+
"total": obj.get("total")
|
88
|
+
})
|
89
|
+
return _obj
|
90
|
+
|
91
|
+
|
@@ -0,0 +1,98 @@
|
|
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
|
+
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
|
24
|
+
|
25
|
+
class TeamSeasonUnitStatsFourFactors(BaseModel):
|
26
|
+
"""
|
27
|
+
TeamSeasonUnitStatsFourFactors
|
28
|
+
"""
|
29
|
+
free_throw_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="freeThrowRate")
|
30
|
+
offensive_rebound_pct: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="offensiveReboundPct")
|
31
|
+
turnover_ratio: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="turnoverRatio")
|
32
|
+
effective_field_goal_pct: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="effectiveFieldGoalPct")
|
33
|
+
__properties = ["freeThrowRate", "offensiveReboundPct", "turnoverRatio", "effectiveFieldGoalPct"]
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
"""Pydantic configuration"""
|
37
|
+
allow_population_by_field_name = True
|
38
|
+
validate_assignment = True
|
39
|
+
|
40
|
+
def to_str(self) -> str:
|
41
|
+
"""Returns the string representation of the model using alias"""
|
42
|
+
return pprint.pformat(self.dict(by_alias=True))
|
43
|
+
|
44
|
+
def to_json(self) -> str:
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
46
|
+
return json.dumps(self.to_dict())
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def from_json(cls, json_str: str) -> TeamSeasonUnitStatsFourFactors:
|
50
|
+
"""Create an instance of TeamSeasonUnitStatsFourFactors from a JSON string"""
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
52
|
+
|
53
|
+
def to_dict(self):
|
54
|
+
"""Returns the dictionary representation of the model using alias"""
|
55
|
+
_dict = self.dict(by_alias=True,
|
56
|
+
exclude={
|
57
|
+
},
|
58
|
+
exclude_none=True)
|
59
|
+
# set to None if free_throw_rate (nullable) is None
|
60
|
+
# and __fields_set__ contains the field
|
61
|
+
if self.free_throw_rate is None and "free_throw_rate" in self.__fields_set__:
|
62
|
+
_dict['freeThrowRate'] = None
|
63
|
+
|
64
|
+
# set to None if offensive_rebound_pct (nullable) is None
|
65
|
+
# and __fields_set__ contains the field
|
66
|
+
if self.offensive_rebound_pct is None and "offensive_rebound_pct" in self.__fields_set__:
|
67
|
+
_dict['offensiveReboundPct'] = None
|
68
|
+
|
69
|
+
# set to None if turnover_ratio (nullable) is None
|
70
|
+
# and __fields_set__ contains the field
|
71
|
+
if self.turnover_ratio is None and "turnover_ratio" in self.__fields_set__:
|
72
|
+
_dict['turnoverRatio'] = None
|
73
|
+
|
74
|
+
# set to None if effective_field_goal_pct (nullable) is None
|
75
|
+
# and __fields_set__ contains the field
|
76
|
+
if self.effective_field_goal_pct is None and "effective_field_goal_pct" in self.__fields_set__:
|
77
|
+
_dict['effectiveFieldGoalPct'] = None
|
78
|
+
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> TeamSeasonUnitStatsFourFactors:
|
83
|
+
"""Create an instance of TeamSeasonUnitStatsFourFactors from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return TeamSeasonUnitStatsFourFactors.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = TeamSeasonUnitStatsFourFactors.parse_obj({
|
91
|
+
"free_throw_rate": obj.get("freeThrowRate"),
|
92
|
+
"offensive_rebound_pct": obj.get("offensiveReboundPct"),
|
93
|
+
"turnover_ratio": obj.get("turnoverRatio"),
|
94
|
+
"effective_field_goal_pct": obj.get("effectiveFieldGoalPct")
|
95
|
+
})
|
96
|
+
return _obj
|
97
|
+
|
98
|
+
|
@@ -0,0 +1,98 @@
|
|
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
|
+
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
|
24
|
+
|
25
|
+
class TeamSeasonUnitStatsPoints(BaseModel):
|
26
|
+
"""
|
27
|
+
TeamSeasonUnitStatsPoints
|
28
|
+
"""
|
29
|
+
fast_break: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="fastBreak")
|
30
|
+
off_turnovers: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="offTurnovers")
|
31
|
+
in_paint: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="inPaint")
|
32
|
+
total: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
33
|
+
__properties = ["fastBreak", "offTurnovers", "inPaint", "total"]
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
"""Pydantic configuration"""
|
37
|
+
allow_population_by_field_name = True
|
38
|
+
validate_assignment = True
|
39
|
+
|
40
|
+
def to_str(self) -> str:
|
41
|
+
"""Returns the string representation of the model using alias"""
|
42
|
+
return pprint.pformat(self.dict(by_alias=True))
|
43
|
+
|
44
|
+
def to_json(self) -> str:
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
46
|
+
return json.dumps(self.to_dict())
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def from_json(cls, json_str: str) -> TeamSeasonUnitStatsPoints:
|
50
|
+
"""Create an instance of TeamSeasonUnitStatsPoints from a JSON string"""
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
52
|
+
|
53
|
+
def to_dict(self):
|
54
|
+
"""Returns the dictionary representation of the model using alias"""
|
55
|
+
_dict = self.dict(by_alias=True,
|
56
|
+
exclude={
|
57
|
+
},
|
58
|
+
exclude_none=True)
|
59
|
+
# set to None if fast_break (nullable) is None
|
60
|
+
# and __fields_set__ contains the field
|
61
|
+
if self.fast_break is None and "fast_break" in self.__fields_set__:
|
62
|
+
_dict['fastBreak'] = None
|
63
|
+
|
64
|
+
# set to None if off_turnovers (nullable) is None
|
65
|
+
# and __fields_set__ contains the field
|
66
|
+
if self.off_turnovers is None and "off_turnovers" in self.__fields_set__:
|
67
|
+
_dict['offTurnovers'] = None
|
68
|
+
|
69
|
+
# set to None if in_paint (nullable) is None
|
70
|
+
# and __fields_set__ contains the field
|
71
|
+
if self.in_paint is None and "in_paint" in self.__fields_set__:
|
72
|
+
_dict['inPaint'] = None
|
73
|
+
|
74
|
+
# set to None if total (nullable) is None
|
75
|
+
# and __fields_set__ contains the field
|
76
|
+
if self.total is None and "total" in self.__fields_set__:
|
77
|
+
_dict['total'] = None
|
78
|
+
|
79
|
+
return _dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls, obj: dict) -> TeamSeasonUnitStatsPoints:
|
83
|
+
"""Create an instance of TeamSeasonUnitStatsPoints from a dict"""
|
84
|
+
if obj is None:
|
85
|
+
return None
|
86
|
+
|
87
|
+
if not isinstance(obj, dict):
|
88
|
+
return TeamSeasonUnitStatsPoints.parse_obj(obj)
|
89
|
+
|
90
|
+
_obj = TeamSeasonUnitStatsPoints.parse_obj({
|
91
|
+
"fast_break": obj.get("fastBreak"),
|
92
|
+
"off_turnovers": obj.get("offTurnovers"),
|
93
|
+
"in_paint": obj.get("inPaint"),
|
94
|
+
"total": obj.get("total")
|
95
|
+
})
|
96
|
+
return _obj
|
97
|
+
|
98
|
+
|
@@ -0,0 +1,91 @@
|
|
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
|
+
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
|
24
|
+
|
25
|
+
class TeamSeasonUnitStatsRebounds(BaseModel):
|
26
|
+
"""
|
27
|
+
TeamSeasonUnitStatsRebounds
|
28
|
+
"""
|
29
|
+
total: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
30
|
+
defensive: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
31
|
+
offensive: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
32
|
+
__properties = ["total", "defensive", "offensive"]
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
"""Pydantic configuration"""
|
36
|
+
allow_population_by_field_name = True
|
37
|
+
validate_assignment = True
|
38
|
+
|
39
|
+
def to_str(self) -> str:
|
40
|
+
"""Returns the string representation of the model using alias"""
|
41
|
+
return pprint.pformat(self.dict(by_alias=True))
|
42
|
+
|
43
|
+
def to_json(self) -> str:
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
45
|
+
return json.dumps(self.to_dict())
|
46
|
+
|
47
|
+
@classmethod
|
48
|
+
def from_json(cls, json_str: str) -> TeamSeasonUnitStatsRebounds:
|
49
|
+
"""Create an instance of TeamSeasonUnitStatsRebounds from a JSON string"""
|
50
|
+
return cls.from_dict(json.loads(json_str))
|
51
|
+
|
52
|
+
def to_dict(self):
|
53
|
+
"""Returns the dictionary representation of the model using alias"""
|
54
|
+
_dict = self.dict(by_alias=True,
|
55
|
+
exclude={
|
56
|
+
},
|
57
|
+
exclude_none=True)
|
58
|
+
# set to None if total (nullable) is None
|
59
|
+
# and __fields_set__ contains the field
|
60
|
+
if self.total is None and "total" in self.__fields_set__:
|
61
|
+
_dict['total'] = None
|
62
|
+
|
63
|
+
# set to None if defensive (nullable) is None
|
64
|
+
# and __fields_set__ contains the field
|
65
|
+
if self.defensive is None and "defensive" in self.__fields_set__:
|
66
|
+
_dict['defensive'] = None
|
67
|
+
|
68
|
+
# set to None if offensive (nullable) is None
|
69
|
+
# and __fields_set__ contains the field
|
70
|
+
if self.offensive is None and "offensive" in self.__fields_set__:
|
71
|
+
_dict['offensive'] = None
|
72
|
+
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: dict) -> TeamSeasonUnitStatsRebounds:
|
77
|
+
"""Create an instance of TeamSeasonUnitStatsRebounds from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return TeamSeasonUnitStatsRebounds.parse_obj(obj)
|
83
|
+
|
84
|
+
_obj = TeamSeasonUnitStatsRebounds.parse_obj({
|
85
|
+
"total": obj.get("total"),
|
86
|
+
"defensive": obj.get("defensive"),
|
87
|
+
"offensive": obj.get("offensive")
|
88
|
+
})
|
89
|
+
return _obj
|
90
|
+
|
91
|
+
|