diff --git a/statsapi/__init__.py b/statsapi/__init__.py index 8a74478..528c275 100644 --- a/statsapi/__init__.py +++ b/statsapi/__init__.py @@ -48,6 +48,7 @@ def schedule( opponent="", sportId=1, game_id=None, + leagueId=None, ): """Get list of games for a given date/range and/or team/opponent.""" if end_date and not start_date: @@ -74,6 +75,9 @@ def schedule( if game_id: params.update({"gamePks": game_id}) + if leagueId: + params.update({"leagueId": leagueId}) + hydrate = ( "decisions,probablePitcher(note),linescore,broadcasts,game(content(media(epg)))" ) @@ -675,7 +679,7 @@ def boxscore_data(gamePk, timecode=None): battingNotes = [awayBattingNotes, homeBattingNotes] for i in range(0, len(sides)): for n in boxData[sides[i]]["note"]: - awayBattingNotes.update( + battingNotes[i].update( {len(battingNotes[i]): n["label"] + "-" + n["value"]} ) diff --git a/statsapi/version.py b/statsapi/version.py index 8aadcb9..394fac2 100644 --- a/statsapi/version.py +++ b/statsapi/version.py @@ -1,3 +1,3 @@ #!/usr/bin/env python -VERSION = "1.7" +VERSION = "1.7.1"