cbbd 1.1.0a1__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.
- 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,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.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
|
+
|
23
|
+
from pydantic import BaseModel, Field, StrictStr
|
24
|
+
|
25
|
+
class GameMediaInfoBroadcastsInner(BaseModel):
|
26
|
+
"""
|
27
|
+
GameMediaInfoBroadcastsInner
|
28
|
+
"""
|
29
|
+
broadcast_name: StrictStr = Field(default=..., alias="broadcastName")
|
30
|
+
broadcast_type: StrictStr = Field(default=..., alias="broadcastType")
|
31
|
+
__properties = ["broadcastName", "broadcastType"]
|
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) -> GameMediaInfoBroadcastsInner:
|
48
|
+
"""Create an instance of GameMediaInfoBroadcastsInner 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) -> GameMediaInfoBroadcastsInner:
|
61
|
+
"""Create an instance of GameMediaInfoBroadcastsInner from a dict"""
|
62
|
+
if obj is None:
|
63
|
+
return None
|
64
|
+
|
65
|
+
if not isinstance(obj, dict):
|
66
|
+
return GameMediaInfoBroadcastsInner.parse_obj(obj)
|
67
|
+
|
68
|
+
_obj = GameMediaInfoBroadcastsInner.parse_obj({
|
69
|
+
"broadcast_name": obj.get("broadcastName"),
|
70
|
+
"broadcast_type": obj.get("broadcastType")
|
71
|
+
})
|
72
|
+
return _obj
|
73
|
+
|
74
|
+
|
@@ -0,0 +1,44 @@
|
|
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
|
+
import json
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
from aenum import Enum, no_arg
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
class GameStatus(str, Enum):
|
26
|
+
"""
|
27
|
+
GameStatus
|
28
|
+
"""
|
29
|
+
|
30
|
+
"""
|
31
|
+
allowed enum values
|
32
|
+
"""
|
33
|
+
SCHEDULED = 'scheduled'
|
34
|
+
IN_PROGRESS = 'in_progress'
|
35
|
+
FINAL = 'final'
|
36
|
+
POSTPONED = 'postponed'
|
37
|
+
CANCELLED = 'cancelled'
|
38
|
+
|
39
|
+
@classmethod
|
40
|
+
def from_json(cls, json_str: str) -> GameStatus:
|
41
|
+
"""Create an instance of GameStatus from a JSON string"""
|
42
|
+
return GameStatus(json.loads(json_str))
|
43
|
+
|
44
|
+
|
cbbd/models/play_info.py
ADDED
@@ -0,0 +1,193 @@
|
|
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
|
+
from datetime import datetime
|
22
|
+
from typing import List, Optional, Union
|
23
|
+
from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr, conlist
|
24
|
+
from cbbd.models.play_info_participants_inner import PlayInfoParticipantsInner
|
25
|
+
from cbbd.models.season_type import SeasonType
|
26
|
+
|
27
|
+
class PlayInfo(BaseModel):
|
28
|
+
"""
|
29
|
+
PlayInfo
|
30
|
+
"""
|
31
|
+
id: StrictInt = Field(...)
|
32
|
+
source_id: StrictStr = Field(default=..., alias="sourceId")
|
33
|
+
game_id: StrictInt = Field(default=..., alias="gameId")
|
34
|
+
game_source_id: StrictStr = Field(default=..., alias="gameSourceId")
|
35
|
+
game_start_date: datetime = Field(default=..., alias="gameStartDate")
|
36
|
+
season: Union[StrictFloat, StrictInt] = Field(...)
|
37
|
+
season_type: SeasonType = Field(default=..., alias="seasonType")
|
38
|
+
game_type: StrictStr = Field(default=..., alias="gameType")
|
39
|
+
play_type: StrictStr = Field(default=..., alias="playType")
|
40
|
+
is_home_team: Optional[StrictBool] = Field(default=..., alias="isHomeTeam")
|
41
|
+
team_id: Optional[StrictInt] = Field(default=..., alias="teamId")
|
42
|
+
team: Optional[StrictStr] = Field(...)
|
43
|
+
conference: Optional[StrictStr] = Field(...)
|
44
|
+
opponent_id: Optional[StrictInt] = Field(default=..., alias="opponentId")
|
45
|
+
opponent: Optional[StrictStr] = Field(...)
|
46
|
+
opponent_conference: Optional[StrictStr] = Field(default=..., alias="opponentConference")
|
47
|
+
period: StrictInt = Field(...)
|
48
|
+
clock: StrictStr = Field(...)
|
49
|
+
seconds_remaining: StrictInt = Field(default=..., alias="secondsRemaining")
|
50
|
+
home_score: StrictInt = Field(default=..., alias="homeScore")
|
51
|
+
away_score: StrictInt = Field(default=..., alias="awayScore")
|
52
|
+
scoring_play: Optional[StrictBool] = Field(default=..., alias="scoringPlay")
|
53
|
+
shooting_play: Optional[StrictBool] = Field(default=..., alias="shootingPlay")
|
54
|
+
score_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=..., alias="scoreValue")
|
55
|
+
wallclock: Optional[datetime] = Field(...)
|
56
|
+
play_text: Optional[StrictStr] = Field(default=..., alias="playText")
|
57
|
+
participants: conlist(PlayInfoParticipantsInner) = Field(...)
|
58
|
+
__properties = ["id", "sourceId", "gameId", "gameSourceId", "gameStartDate", "season", "seasonType", "gameType", "playType", "isHomeTeam", "teamId", "team", "conference", "opponentId", "opponent", "opponentConference", "period", "clock", "secondsRemaining", "homeScore", "awayScore", "scoringPlay", "shootingPlay", "scoreValue", "wallclock", "playText", "participants"]
|
59
|
+
|
60
|
+
class Config:
|
61
|
+
"""Pydantic configuration"""
|
62
|
+
allow_population_by_field_name = True
|
63
|
+
validate_assignment = True
|
64
|
+
|
65
|
+
def to_str(self) -> str:
|
66
|
+
"""Returns the string representation of the model using alias"""
|
67
|
+
return pprint.pformat(self.dict(by_alias=True))
|
68
|
+
|
69
|
+
def to_json(self) -> str:
|
70
|
+
"""Returns the JSON representation of the model using alias"""
|
71
|
+
return json.dumps(self.to_dict())
|
72
|
+
|
73
|
+
@classmethod
|
74
|
+
def from_json(cls, json_str: str) -> PlayInfo:
|
75
|
+
"""Create an instance of PlayInfo from a JSON string"""
|
76
|
+
return cls.from_dict(json.loads(json_str))
|
77
|
+
|
78
|
+
def to_dict(self):
|
79
|
+
"""Returns the dictionary representation of the model using alias"""
|
80
|
+
_dict = self.dict(by_alias=True,
|
81
|
+
exclude={
|
82
|
+
},
|
83
|
+
exclude_none=True)
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of each item in participants (list)
|
85
|
+
_items = []
|
86
|
+
if self.participants:
|
87
|
+
for _item in self.participants:
|
88
|
+
if _item:
|
89
|
+
_items.append(_item.to_dict())
|
90
|
+
_dict['participants'] = _items
|
91
|
+
# set to None if is_home_team (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.is_home_team is None and "is_home_team" in self.__fields_set__:
|
94
|
+
_dict['isHomeTeam'] = None
|
95
|
+
|
96
|
+
# set to None if team_id (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.team_id is None and "team_id" in self.__fields_set__:
|
99
|
+
_dict['teamId'] = None
|
100
|
+
|
101
|
+
# set to None if team (nullable) is None
|
102
|
+
# and __fields_set__ contains the field
|
103
|
+
if self.team is None and "team" in self.__fields_set__:
|
104
|
+
_dict['team'] = None
|
105
|
+
|
106
|
+
# set to None if conference (nullable) is None
|
107
|
+
# and __fields_set__ contains the field
|
108
|
+
if self.conference is None and "conference" in self.__fields_set__:
|
109
|
+
_dict['conference'] = None
|
110
|
+
|
111
|
+
# set to None if opponent_id (nullable) is None
|
112
|
+
# and __fields_set__ contains the field
|
113
|
+
if self.opponent_id is None and "opponent_id" in self.__fields_set__:
|
114
|
+
_dict['opponentId'] = None
|
115
|
+
|
116
|
+
# set to None if opponent (nullable) is None
|
117
|
+
# and __fields_set__ contains the field
|
118
|
+
if self.opponent is None and "opponent" in self.__fields_set__:
|
119
|
+
_dict['opponent'] = None
|
120
|
+
|
121
|
+
# set to None if opponent_conference (nullable) is None
|
122
|
+
# and __fields_set__ contains the field
|
123
|
+
if self.opponent_conference is None and "opponent_conference" in self.__fields_set__:
|
124
|
+
_dict['opponentConference'] = None
|
125
|
+
|
126
|
+
# set to None if scoring_play (nullable) is None
|
127
|
+
# and __fields_set__ contains the field
|
128
|
+
if self.scoring_play is None and "scoring_play" in self.__fields_set__:
|
129
|
+
_dict['scoringPlay'] = None
|
130
|
+
|
131
|
+
# set to None if shooting_play (nullable) is None
|
132
|
+
# and __fields_set__ contains the field
|
133
|
+
if self.shooting_play is None and "shooting_play" in self.__fields_set__:
|
134
|
+
_dict['shootingPlay'] = None
|
135
|
+
|
136
|
+
# set to None if score_value (nullable) is None
|
137
|
+
# and __fields_set__ contains the field
|
138
|
+
if self.score_value is None and "score_value" in self.__fields_set__:
|
139
|
+
_dict['scoreValue'] = None
|
140
|
+
|
141
|
+
# set to None if wallclock (nullable) is None
|
142
|
+
# and __fields_set__ contains the field
|
143
|
+
if self.wallclock is None and "wallclock" in self.__fields_set__:
|
144
|
+
_dict['wallclock'] = None
|
145
|
+
|
146
|
+
# set to None if play_text (nullable) is None
|
147
|
+
# and __fields_set__ contains the field
|
148
|
+
if self.play_text is None and "play_text" in self.__fields_set__:
|
149
|
+
_dict['playText'] = None
|
150
|
+
|
151
|
+
return _dict
|
152
|
+
|
153
|
+
@classmethod
|
154
|
+
def from_dict(cls, obj: dict) -> PlayInfo:
|
155
|
+
"""Create an instance of PlayInfo from a dict"""
|
156
|
+
if obj is None:
|
157
|
+
return None
|
158
|
+
|
159
|
+
if not isinstance(obj, dict):
|
160
|
+
return PlayInfo.parse_obj(obj)
|
161
|
+
|
162
|
+
_obj = PlayInfo.parse_obj({
|
163
|
+
"id": obj.get("id"),
|
164
|
+
"source_id": obj.get("sourceId"),
|
165
|
+
"game_id": obj.get("gameId"),
|
166
|
+
"game_source_id": obj.get("gameSourceId"),
|
167
|
+
"game_start_date": obj.get("gameStartDate"),
|
168
|
+
"season": obj.get("season"),
|
169
|
+
"season_type": obj.get("seasonType"),
|
170
|
+
"game_type": obj.get("gameType"),
|
171
|
+
"play_type": obj.get("playType"),
|
172
|
+
"is_home_team": obj.get("isHomeTeam"),
|
173
|
+
"team_id": obj.get("teamId"),
|
174
|
+
"team": obj.get("team"),
|
175
|
+
"conference": obj.get("conference"),
|
176
|
+
"opponent_id": obj.get("opponentId"),
|
177
|
+
"opponent": obj.get("opponent"),
|
178
|
+
"opponent_conference": obj.get("opponentConference"),
|
179
|
+
"period": obj.get("period"),
|
180
|
+
"clock": obj.get("clock"),
|
181
|
+
"seconds_remaining": obj.get("secondsRemaining"),
|
182
|
+
"home_score": obj.get("homeScore"),
|
183
|
+
"away_score": obj.get("awayScore"),
|
184
|
+
"scoring_play": obj.get("scoringPlay"),
|
185
|
+
"shooting_play": obj.get("shootingPlay"),
|
186
|
+
"score_value": obj.get("scoreValue"),
|
187
|
+
"wallclock": obj.get("wallclock"),
|
188
|
+
"play_text": obj.get("playText"),
|
189
|
+
"participants": [PlayInfoParticipantsInner.from_dict(_item) for _item in obj.get("participants")] if obj.get("participants") is not None else None
|
190
|
+
})
|
191
|
+
return _obj
|
192
|
+
|
193
|
+
|
@@ -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.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
|
+
|
23
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr
|
24
|
+
|
25
|
+
class PlayInfoParticipantsInner(BaseModel):
|
26
|
+
"""
|
27
|
+
PlayInfoParticipantsInner
|
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) -> PlayInfoParticipantsInner:
|
48
|
+
"""Create an instance of PlayInfoParticipantsInner 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) -> PlayInfoParticipantsInner:
|
61
|
+
"""Create an instance of PlayInfoParticipantsInner from a dict"""
|
62
|
+
if obj is None:
|
63
|
+
return None
|
64
|
+
|
65
|
+
if not isinstance(obj, dict):
|
66
|
+
return PlayInfoParticipantsInner.parse_obj(obj)
|
67
|
+
|
68
|
+
_obj = PlayInfoParticipantsInner.parse_obj({
|
69
|
+
"name": obj.get("name"),
|
70
|
+
"id": obj.get("id")
|
71
|
+
})
|
72
|
+
return _obj
|
73
|
+
|
74
|
+
|
@@ -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.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
|
+
|
23
|
+
from pydantic import BaseModel, Field, StrictInt, StrictStr
|
24
|
+
|
25
|
+
class PlayTypeInfo(BaseModel):
|
26
|
+
"""
|
27
|
+
PlayTypeInfo
|
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) -> PlayTypeInfo:
|
48
|
+
"""Create an instance of PlayTypeInfo 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) -> PlayTypeInfo:
|
61
|
+
"""Create an instance of PlayTypeInfo from a dict"""
|
62
|
+
if obj is None:
|
63
|
+
return None
|
64
|
+
|
65
|
+
if not isinstance(obj, dict):
|
66
|
+
return PlayTypeInfo.parse_obj(obj)
|
67
|
+
|
68
|
+
_obj = PlayTypeInfo.parse_obj({
|
69
|
+
"id": obj.get("id"),
|
70
|
+
"name": obj.get("name")
|
71
|
+
})
|
72
|
+
return _obj
|
73
|
+
|
74
|
+
|