From 86c2028d8c3d61b229376c9922b3705e18acebb5 Mon Sep 17 00:00:00 2001 From: Desi Pilla Date: Sun, 3 Dec 2023 19:52:03 -0500 Subject: [PATCH] feat: Add `previousSeasons` to `League` object Add a list of all previous seasons for a league. I know this is accurate for football leagues, and I assume(?) this is the same across all ESPN leagues and should be a part of the `BaseLeague` object. --- espn_api/base_league.py | 1 + 1 file changed, 1 insertion(+) diff --git a/espn_api/base_league.py b/espn_api/base_league.py index 7aea1477..7e228bec 100644 --- a/espn_api/base_league.py +++ b/espn_api/base_league.py @@ -34,6 +34,7 @@ def _fetch_league(self, SettingsClass = BaseSettings): self.scoringPeriodId = data['scoringPeriodId'] self.firstScoringPeriod = data['status']['firstScoringPeriod'] self.finalScoringPeriod = data['status']['finalScoringPeriod'] + self.previousSeasons = data["status"]["previousSeasons"] if self.year < 2018: self.current_week = data['scoringPeriodId'] else: