cbbd 1.1.3__py3-none-any.whl → 1.3.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 +11 -2
- cbbd/api/__init__.py +1 -0
- cbbd/api/conferences_api.py +146 -2
- cbbd/api/games_api.py +1 -1
- cbbd/api/lines_api.py +358 -0
- cbbd/api/plays_api.py +1 -1
- cbbd/api/stats_api.py +1 -1
- cbbd/api/teams_api.py +150 -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 +9 -1
- cbbd/models/conference_history.py +90 -0
- cbbd/models/conference_history_teams_inner.py +92 -0
- 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 +114 -0
- cbbd/models/game_lines.py +125 -0
- 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 +74 -0
- cbbd/models/play_info.py +1 -1
- 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/season_type.py +1 -1
- cbbd/models/team_info.py +1 -1
- cbbd/models/team_roster.py +95 -0
- cbbd/models/team_roster_player.py +135 -0
- cbbd/models/team_roster_player_hometown.py +91 -0
- 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.1.3.dist-info → cbbd-1.3.0.dist-info}/METADATA +1 -1
- cbbd-1.3.0.dist-info/RECORD +53 -0
- cbbd-1.1.3.dist-info/RECORD +0 -44
- {cbbd-1.1.3.dist-info → cbbd-1.3.0.dist-info}/WHEEL +0 -0
- {cbbd-1.1.3.dist-info → cbbd-1.3.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,125 @@
|
|
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
|
+
from datetime import datetime
|
22
|
+
from typing import List, Optional, Union
|
23
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist
|
24
|
+
from cbbd.models.game_line_info import GameLineInfo
|
25
|
+
from cbbd.models.season_type import SeasonType
|
26
|
+
|
27
|
+
class GameLines(BaseModel):
|
28
|
+
"""
|
29
|
+
GameLines
|
30
|
+
"""
|
31
|
+
game_id: StrictInt = Field(default=..., alias="gameId")
|
32
|
+
season: StrictInt = Field(...)
|
33
|
+
season_type: SeasonType = Field(default=..., alias="seasonType")
|
34
|
+
start_date: datetime = Field(default=..., alias="startDate")
|
35
|
+
home_team_id: StrictInt = Field(default=..., alias="homeTeamId")
|
36
|
+
home_team: StrictStr = Field(default=..., alias="homeTeam")
|
37
|
+
home_conference: Optional[StrictStr] = Field(default=..., alias="homeConference")
|
38
|
+
home_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="homeScore")
|
39
|
+
away_team_id: StrictInt = Field(default=..., alias="awayTeamId")
|
40
|
+
away_team: StrictStr = Field(default=..., alias="awayTeam")
|
41
|
+
away_conference: Optional[StrictStr] = Field(default=..., alias="awayConference")
|
42
|
+
away_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="awayScore")
|
43
|
+
lines: conlist(GameLineInfo) = Field(...)
|
44
|
+
__properties = ["gameId", "season", "seasonType", "startDate", "homeTeamId", "homeTeam", "homeConference", "homeScore", "awayTeamId", "awayTeam", "awayConference", "awayScore", "lines"]
|
45
|
+
|
46
|
+
class Config:
|
47
|
+
"""Pydantic configuration"""
|
48
|
+
allow_population_by_field_name = True
|
49
|
+
validate_assignment = True
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> GameLines:
|
61
|
+
"""Create an instance of GameLines from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self):
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
66
|
+
_dict = self.dict(by_alias=True,
|
67
|
+
exclude={
|
68
|
+
},
|
69
|
+
exclude_none=True)
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each item in lines (list)
|
71
|
+
_items = []
|
72
|
+
if self.lines:
|
73
|
+
for _item in self.lines:
|
74
|
+
if _item:
|
75
|
+
_items.append(_item.to_dict())
|
76
|
+
_dict['lines'] = _items
|
77
|
+
# set to None if home_conference (nullable) is None
|
78
|
+
# and __fields_set__ contains the field
|
79
|
+
if self.home_conference is None and "home_conference" in self.__fields_set__:
|
80
|
+
_dict['homeConference'] = None
|
81
|
+
|
82
|
+
# set to None if home_score (nullable) is None
|
83
|
+
# and __fields_set__ contains the field
|
84
|
+
if self.home_score is None and "home_score" in self.__fields_set__:
|
85
|
+
_dict['homeScore'] = None
|
86
|
+
|
87
|
+
# set to None if away_conference (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.away_conference is None and "away_conference" in self.__fields_set__:
|
90
|
+
_dict['awayConference'] = None
|
91
|
+
|
92
|
+
# set to None if away_score (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.away_score is None and "away_score" in self.__fields_set__:
|
95
|
+
_dict['awayScore'] = None
|
96
|
+
|
97
|
+
return _dict
|
98
|
+
|
99
|
+
@classmethod
|
100
|
+
def from_dict(cls, obj: dict) -> GameLines:
|
101
|
+
"""Create an instance of GameLines from a dict"""
|
102
|
+
if obj is None:
|
103
|
+
return None
|
104
|
+
|
105
|
+
if not isinstance(obj, dict):
|
106
|
+
return GameLines.parse_obj(obj)
|
107
|
+
|
108
|
+
_obj = GameLines.parse_obj({
|
109
|
+
"game_id": obj.get("gameId"),
|
110
|
+
"season": obj.get("season"),
|
111
|
+
"season_type": obj.get("seasonType"),
|
112
|
+
"start_date": obj.get("startDate"),
|
113
|
+
"home_team_id": obj.get("homeTeamId"),
|
114
|
+
"home_team": obj.get("homeTeam"),
|
115
|
+
"home_conference": obj.get("homeConference"),
|
116
|
+
"home_score": obj.get("homeScore"),
|
117
|
+
"away_team_id": obj.get("awayTeamId"),
|
118
|
+
"away_team": obj.get("awayTeam"),
|
119
|
+
"away_conference": obj.get("awayConference"),
|
120
|
+
"away_score": obj.get("awayScore"),
|
121
|
+
"lines": [GameLineInfo.from_dict(_item) for _item in obj.get("lines")] if obj.get("lines") is not None else None
|
122
|
+
})
|
123
|
+
return _obj
|
124
|
+
|
125
|
+
|
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.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.
|
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_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.3.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -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.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
|
+
|
23
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr
|
24
|
+
|
25
|
+
class LineProviderInfo(BaseModel):
|
26
|
+
"""
|
27
|
+
LineProviderInfo
|
28
|
+
"""
|
29
|
+
id: StrictInt = Field(...)
|
30
|
+
name: StrictStr = Field(...)
|
31
|
+
__properties = ["id", "name"]
|
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) -> LineProviderInfo:
|
48
|
+
"""Create an instance of LineProviderInfo 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) -> LineProviderInfo:
|
61
|
+
"""Create an instance of LineProviderInfo from a dict"""
|
62
|
+
if obj is None:
|
63
|
+
return None
|
64
|
+
|
65
|
+
if not isinstance(obj, dict):
|
66
|
+
return LineProviderInfo.parse_obj(obj)
|
67
|
+
|
68
|
+
_obj = LineProviderInfo.parse_obj({
|
69
|
+
"id": obj.get("id"),
|
70
|
+
"name": obj.get("name")
|
71
|
+
})
|
72
|
+
return _obj
|
73
|
+
|
74
|
+
|
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.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.
|
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/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.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.
|
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/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.3.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.3.0
|
9
9
|
Contact: admin@collegefootballdata.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -0,0 +1,95 @@
|
|
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, Optional, Union
|
23
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist
|
24
|
+
from cbbd.models.team_roster_player import TeamRosterPlayer
|
25
|
+
|
26
|
+
class TeamRoster(BaseModel):
|
27
|
+
"""
|
28
|
+
TeamRoster
|
29
|
+
"""
|
30
|
+
team_id: StrictInt = Field(default=..., alias="teamId")
|
31
|
+
team_source_id: StrictStr = Field(default=..., alias="teamSourceId")
|
32
|
+
team: StrictStr = Field(...)
|
33
|
+
conference: Optional[StrictStr] = Field(...)
|
34
|
+
season: Union[StrictFloat, StrictInt] = Field(...)
|
35
|
+
players: conlist(TeamRosterPlayer) = Field(...)
|
36
|
+
__properties = ["teamId", "teamSourceId", "team", "conference", "season", "players"]
|
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) -> TeamRoster:
|
53
|
+
"""Create an instance of TeamRoster 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 players (list)
|
63
|
+
_items = []
|
64
|
+
if self.players:
|
65
|
+
for _item in self.players:
|
66
|
+
if _item:
|
67
|
+
_items.append(_item.to_dict())
|
68
|
+
_dict['players'] = _items
|
69
|
+
# set to None if conference (nullable) is None
|
70
|
+
# and __fields_set__ contains the field
|
71
|
+
if self.conference is None and "conference" in self.__fields_set__:
|
72
|
+
_dict['conference'] = None
|
73
|
+
|
74
|
+
return _dict
|
75
|
+
|
76
|
+
@classmethod
|
77
|
+
def from_dict(cls, obj: dict) -> TeamRoster:
|
78
|
+
"""Create an instance of TeamRoster from a dict"""
|
79
|
+
if obj is None:
|
80
|
+
return None
|
81
|
+
|
82
|
+
if not isinstance(obj, dict):
|
83
|
+
return TeamRoster.parse_obj(obj)
|
84
|
+
|
85
|
+
_obj = TeamRoster.parse_obj({
|
86
|
+
"team_id": obj.get("teamId"),
|
87
|
+
"team_source_id": obj.get("teamSourceId"),
|
88
|
+
"team": obj.get("team"),
|
89
|
+
"conference": obj.get("conference"),
|
90
|
+
"season": obj.get("season"),
|
91
|
+
"players": [TeamRosterPlayer.from_dict(_item) for _item in obj.get("players")] if obj.get("players") is not None else None
|
92
|
+
})
|
93
|
+
return _obj
|
94
|
+
|
95
|
+
|
@@ -0,0 +1,135 @@
|
|
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
|
+
from datetime import date
|
22
|
+
from typing import Optional, Union
|
23
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr
|
24
|
+
from cbbd.models.team_roster_player_hometown import TeamRosterPlayerHometown
|
25
|
+
|
26
|
+
class TeamRosterPlayer(BaseModel):
|
27
|
+
"""
|
28
|
+
TeamRosterPlayer
|
29
|
+
"""
|
30
|
+
id: StrictInt = Field(...)
|
31
|
+
source_id: StrictStr = Field(default=..., alias="sourceId")
|
32
|
+
name: StrictStr = Field(...)
|
33
|
+
first_name: Optional[StrictStr] = Field(default=..., alias="firstName")
|
34
|
+
last_name: Optional[StrictStr] = Field(default=..., alias="lastName")
|
35
|
+
jersey: Optional[StrictStr] = Field(...)
|
36
|
+
position: Optional[StrictStr] = Field(...)
|
37
|
+
height: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
38
|
+
weight: Optional[Union[StrictFloat, StrictInt]] = Field(...)
|
39
|
+
hometown: TeamRosterPlayerHometown = Field(...)
|
40
|
+
date_of_birth: Optional[date] = Field(default=..., alias="dateOfBirth")
|
41
|
+
start_season: Union[StrictFloat, StrictInt] = Field(default=..., alias="startSeason")
|
42
|
+
end_season: Union[StrictFloat, StrictInt] = Field(default=..., alias="endSeason")
|
43
|
+
__properties = ["id", "sourceId", "name", "firstName", "lastName", "jersey", "position", "height", "weight", "hometown", "dateOfBirth", "startSeason", "endSeason"]
|
44
|
+
|
45
|
+
class Config:
|
46
|
+
"""Pydantic configuration"""
|
47
|
+
allow_population_by_field_name = True
|
48
|
+
validate_assignment = True
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.dict(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
return json.dumps(self.to_dict())
|
57
|
+
|
58
|
+
@classmethod
|
59
|
+
def from_json(cls, json_str: str) -> TeamRosterPlayer:
|
60
|
+
"""Create an instance of TeamRosterPlayer from a JSON string"""
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
62
|
+
|
63
|
+
def to_dict(self):
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
65
|
+
_dict = self.dict(by_alias=True,
|
66
|
+
exclude={
|
67
|
+
},
|
68
|
+
exclude_none=True)
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of hometown
|
70
|
+
if self.hometown:
|
71
|
+
_dict['hometown'] = self.hometown.to_dict()
|
72
|
+
# set to None if first_name (nullable) is None
|
73
|
+
# and __fields_set__ contains the field
|
74
|
+
if self.first_name is None and "first_name" in self.__fields_set__:
|
75
|
+
_dict['firstName'] = None
|
76
|
+
|
77
|
+
# set to None if last_name (nullable) is None
|
78
|
+
# and __fields_set__ contains the field
|
79
|
+
if self.last_name is None and "last_name" in self.__fields_set__:
|
80
|
+
_dict['lastName'] = None
|
81
|
+
|
82
|
+
# set to None if jersey (nullable) is None
|
83
|
+
# and __fields_set__ contains the field
|
84
|
+
if self.jersey is None and "jersey" in self.__fields_set__:
|
85
|
+
_dict['jersey'] = None
|
86
|
+
|
87
|
+
# set to None if position (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.position is None and "position" in self.__fields_set__:
|
90
|
+
_dict['position'] = None
|
91
|
+
|
92
|
+
# set to None if height (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.height is None and "height" in self.__fields_set__:
|
95
|
+
_dict['height'] = None
|
96
|
+
|
97
|
+
# set to None if weight (nullable) is None
|
98
|
+
# and __fields_set__ contains the field
|
99
|
+
if self.weight is None and "weight" in self.__fields_set__:
|
100
|
+
_dict['weight'] = None
|
101
|
+
|
102
|
+
# set to None if date_of_birth (nullable) is None
|
103
|
+
# and __fields_set__ contains the field
|
104
|
+
if self.date_of_birth is None and "date_of_birth" in self.__fields_set__:
|
105
|
+
_dict['dateOfBirth'] = None
|
106
|
+
|
107
|
+
return _dict
|
108
|
+
|
109
|
+
@classmethod
|
110
|
+
def from_dict(cls, obj: dict) -> TeamRosterPlayer:
|
111
|
+
"""Create an instance of TeamRosterPlayer from a dict"""
|
112
|
+
if obj is None:
|
113
|
+
return None
|
114
|
+
|
115
|
+
if not isinstance(obj, dict):
|
116
|
+
return TeamRosterPlayer.parse_obj(obj)
|
117
|
+
|
118
|
+
_obj = TeamRosterPlayer.parse_obj({
|
119
|
+
"id": obj.get("id"),
|
120
|
+
"source_id": obj.get("sourceId"),
|
121
|
+
"name": obj.get("name"),
|
122
|
+
"first_name": obj.get("firstName"),
|
123
|
+
"last_name": obj.get("lastName"),
|
124
|
+
"jersey": obj.get("jersey"),
|
125
|
+
"position": obj.get("position"),
|
126
|
+
"height": obj.get("height"),
|
127
|
+
"weight": obj.get("weight"),
|
128
|
+
"hometown": TeamRosterPlayerHometown.from_dict(obj.get("hometown")) if obj.get("hometown") is not None else None,
|
129
|
+
"date_of_birth": obj.get("dateOfBirth"),
|
130
|
+
"start_season": obj.get("startSeason"),
|
131
|
+
"end_season": obj.get("endSeason")
|
132
|
+
})
|
133
|
+
return _obj
|
134
|
+
|
135
|
+
|
@@ -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.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, StrictStr
|
24
|
+
|
25
|
+
class TeamRosterPlayerHometown(BaseModel):
|
26
|
+
"""
|
27
|
+
TeamRosterPlayerHometown
|
28
|
+
"""
|
29
|
+
country: Optional[StrictStr] = Field(...)
|
30
|
+
state: Optional[StrictStr] = Field(...)
|
31
|
+
city: Optional[StrictStr] = Field(...)
|
32
|
+
__properties = ["country", "state", "city"]
|
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) -> TeamRosterPlayerHometown:
|
49
|
+
"""Create an instance of TeamRosterPlayerHometown 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 country (nullable) is None
|
59
|
+
# and __fields_set__ contains the field
|
60
|
+
if self.country is None and "country" in self.__fields_set__:
|
61
|
+
_dict['country'] = None
|
62
|
+
|
63
|
+
# set to None if state (nullable) is None
|
64
|
+
# and __fields_set__ contains the field
|
65
|
+
if self.state is None and "state" in self.__fields_set__:
|
66
|
+
_dict['state'] = None
|
67
|
+
|
68
|
+
# set to None if city (nullable) is None
|
69
|
+
# and __fields_set__ contains the field
|
70
|
+
if self.city is None and "city" in self.__fields_set__:
|
71
|
+
_dict['city'] = None
|
72
|
+
|
73
|
+
return _dict
|
74
|
+
|
75
|
+
@classmethod
|
76
|
+
def from_dict(cls, obj: dict) -> TeamRosterPlayerHometown:
|
77
|
+
"""Create an instance of TeamRosterPlayerHometown from a dict"""
|
78
|
+
if obj is None:
|
79
|
+
return None
|
80
|
+
|
81
|
+
if not isinstance(obj, dict):
|
82
|
+
return TeamRosterPlayerHometown.parse_obj(obj)
|
83
|
+
|
84
|
+
_obj = TeamRosterPlayerHometown.parse_obj({
|
85
|
+
"country": obj.get("country"),
|
86
|
+
"state": obj.get("state"),
|
87
|
+
"city": obj.get("city")
|
88
|
+
})
|
89
|
+
return _obj
|
90
|
+
|
91
|
+
|
cbbd/models/team_season_stats.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.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.
|
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.
|
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.
|
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.
|
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.
|
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
|
|