File tree Expand file tree Collapse file tree
mlbstatsapi/models/game/gamedata Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,6 +200,42 @@ class GameReview(MLBBaseModel):
200200 home : ReviewInfo
201201
202202
203+ class AbsChallengeInfo (MLBBaseModel ):
204+ """
205+ A class to represent ABS challenge info for each team in this game.
206+
207+ Attributes
208+ ----------
209+ used_successful : int
210+ How many successful ABS challenges were used.
211+ used_failed : int
212+ How many failed ABS challenges were used.
213+ remaining : int
214+ How many ABS challenges are remaining.
215+ """
216+ used_successful : int = Field (alias = "usedSuccessful" )
217+ used_failed : int = Field (alias = "usedFailed" )
218+ remaining : int
219+
220+
221+ class AbsChallenges (MLBBaseModel ):
222+ """
223+ A class to represent ABS challenge information for this game.
224+
225+ Attributes
226+ ----------
227+ has_challenges : bool
228+ If ABS challenges are available.
229+ away : AbsChallengeInfo
230+ Away team ABS challenge info.
231+ home : AbsChallengeInfo
232+ Home team ABS challenge info.
233+ """
234+ has_challenges : bool = Field (alias = "hasChallenges" )
235+ away : AbsChallengeInfo
236+ home : AbsChallengeInfo
237+
238+
203239class GameFlags (MLBBaseModel ):
204240 """
205241 A class to represent the flags for this game.
Original file line number Diff line number Diff line change 1111 GameWeather ,
1212 GameInfo ,
1313 GameReview ,
14+ AbsChallenges ,
1415 GameFlags ,
1516 GameProbablePitchers ,
1617 MoundVisits ,
@@ -57,8 +58,8 @@ class GameData(MLBBaseModel):
5758 Secondary data caster for this game.
5859 mound_visits : MoundVisits
5960 Mound visits for this game.
60- abs_challenges : List[dict]
61- ABS challenges for this game.
61+ abs_challenges : AbsChallenges
62+ ABS challenge information for this game.
6263 """
6364 game : GameDataGame
6465 datetime : GameDatetime
@@ -77,7 +78,7 @@ class GameData(MLBBaseModel):
7778 official_scorer : Optional [Person ] = Field (default = None , alias = "officialScorer" )
7879 primary_data_caster : Optional [Person ] = Field (default = None , alias = "primaryDataCaster" )
7980 secondary_data_caster : Optional [Person ] = Field (default = None , alias = "secondaryDataCaster" )
80- abs_challenges : Optional [List [ dict ] ] = Field (default = None , alias = "absChallenges" )
81+ abs_challenges : Optional [AbsChallenges ] = Field (default = None , alias = "absChallenges" )
8182
8283 @model_validator (mode = 'before' )
8384 @classmethod
You can’t perform that action at this time.
0 commit comments