Skip to content

Commit

Permalink
Update scoreboard function in league.py
Browse files Browse the repository at this point in the history
Updated scoreboard function for 2018 API JSON settings in league.py lines 184-187
  • Loading branch information
Robert-litts authored Dec 15, 2023
1 parent 4a31603 commit 212ac05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion espn_api/football/league.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ def scoreboard(self, week: int = None) -> List[Matchup]:
params = {
'view': 'mMatchupScore',
}
data = self.espn_request.league_get(params=params)
if self.year == 2018:
data = self.espn_request.league_get(params=params)[0]
else:
data = self.espn_request.league_get(params=params)


schedule = data['schedule']
matchups = [Matchup(matchup) for matchup in schedule if matchup['matchupPeriodId'] == week]
Expand Down

0 comments on commit 212ac05

Please sign in to comment.