From 46ce02f2ac09b8de541017b003ea66e31187af60 Mon Sep 17 00:00:00 2001 From: KCNilssen Date: Wed, 12 Jun 2024 20:51:58 -0700 Subject: [PATCH 1/2] Fixing API updates --- mlbstatsapi/models/homerunderby/attributes.py | 2 +- mlbstatsapi/models/stats/hitting.py | 3 +++ mlbstatsapi/models/stats/pitching.py | 3 +++ mlbstatsapi/models/stats/stats.py | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mlbstatsapi/models/homerunderby/attributes.py b/mlbstatsapi/models/homerunderby/attributes.py index 5844d9e9..4b13600d 100644 --- a/mlbstatsapi/models/homerunderby/attributes.py +++ b/mlbstatsapi/models/homerunderby/attributes.py @@ -322,8 +322,8 @@ class Round: A list of objects containing the data for the matchups in the round. """ round: int - numbatters: int matchups: List[Union[Matchup, dict]] + numbatters: Optional[int] = None def __post_init__(self): self.matchups = [Matchup(**matchup) for matchup in self.matchups] \ No newline at end of file diff --git a/mlbstatsapi/models/stats/hitting.py b/mlbstatsapi/models/stats/hitting.py index d00f1927..5edf38b9 100644 --- a/mlbstatsapi/models/stats/hitting.py +++ b/mlbstatsapi/models/stats/hitting.py @@ -139,6 +139,8 @@ class SimpleHittingSplit: gamesplayed : int The number of games played by the batter. + flyouts : int + The number flyouts hit by the batter groundouts : int The amount of groundouts hit by the batter. airouts : int @@ -212,6 +214,7 @@ class SimpleHittingSplit: The number of bats per home run of the batter. """ gamesplayed: Optional[int] = None + flyouts: Optional[int] = None groundouts: Optional[int] = None airouts: Optional[int] = None runs: Optional[int] = None diff --git a/mlbstatsapi/models/stats/pitching.py b/mlbstatsapi/models/stats/pitching.py index e69ab324..46131c0f 100644 --- a/mlbstatsapi/models/stats/pitching.py +++ b/mlbstatsapi/models/stats/pitching.py @@ -28,6 +28,8 @@ class SimplePitchingSplit: The games played by the pitcher. gamesstarted : int The games started by the pitcher. + flyouts : int + The number of flyouts for the pitcher groundouts : int The number of groundouts for the pitcher. airouts : int @@ -149,6 +151,7 @@ class SimplePitchingSplit: """ gamesplayed: Optional[int] = None gamesstarted: Optional[int] = None + flyouts: Optional[int] = None groundouts: Optional[int] = None airouts: Optional[int] = None runs: Optional[int] = None diff --git a/mlbstatsapi/models/stats/stats.py b/mlbstatsapi/models/stats/stats.py index 36eb7aa4..9403dd83 100644 --- a/mlbstatsapi/models/stats/stats.py +++ b/mlbstatsapi/models/stats/stats.py @@ -95,6 +95,7 @@ class Split: ---------- season : str numteams : int + numleagues : int gametype : str rank : int position : Position @@ -105,6 +106,7 @@ class Split: """ season: Optional[str] = None numteams: Optional[int] = None + numleagues: Optional[int] = None gametype: Optional[str] = None rank: Optional[int] = None position: Optional[Union[Position, dict]] = field(default_factory=dict) From 2e907a2f16f95d73a81dc7236b343cecbfd459bc Mon Sep 17 00:00:00 2001 From: KCNilssen Date: Wed, 12 Jun 2024 20:54:51 -0700 Subject: [PATCH 2/2] Version bump --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d2f4f65b..0b8e5c87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "python-mlb-statsapi" -version = "0.5.20" +version = "0.5.21" authors = [ { name="Matthew Spah", email="spahmatthew@gmail.com" },