Skip to content

Commit

Permalink
feat: Add previousSeasons to League object
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DesiPilla committed Dec 4, 2023
1 parent cff22b5 commit 86c2028
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions espn_api/base_league.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 86c2028

Please sign in to comment.