Skip to content

Commit fe52456

Browse files
authored
Merge pull request #132 from BrayanMnz/patch-1
Add support for leagueId so we can retrieve data from other leagues
2 parents 6a037e4 + 978d0fb commit fe52456

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

statsapi/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def schedule(
4848
opponent="",
4949
sportId=1,
5050
game_id=None,
51+
leagueId=None
5152
):
5253
"""Get list of games for a given date/range and/or team/opponent."""
5354
if end_date and not start_date:
@@ -74,6 +75,9 @@ def schedule(
7475
if game_id:
7576
params.update({"gamePks": game_id})
7677

78+
if leagueId:
79+
params.update({"leagueId": leagueId})
80+
7781
hydrate = (
7882
"decisions,probablePitcher(note),linescore,broadcasts,game(content(media(epg)))"
7983
)

0 commit comments

Comments
 (0)