Skip to content

Commit

Permalink
Merge pull request #257 from cwendt94/AddPlayoffPCt
Browse files Browse the repository at this point in the history
Add Football Team Playoff Pct
  • Loading branch information
cwendt94 authored Oct 6, 2021
2 parents c7273b8 + 44880c4 commit 15e6858
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions espn_api/football/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def __init__(self, data, roster, member, schedule, year):
self.ties = data['record']['overall']['ties']
self.points_for = data['record']['overall']['pointsFor']
self.points_against = round(data['record']['overall']['pointsAgainst'], 2)
self.playoff_pct = data.get('currentSimulationResults', {}).get('playoffPct', 0) * 100
self.draft_projected_rank = data.get('draftDayProjectedRank', 0)
self.owner = 'None'
if member:
self.owner = "%s %s" % (member['firstName'],
Expand Down
2 changes: 1 addition & 1 deletion espn_api/requests/espn_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get(self, params: dict = None, headers: dict = None, extend: str = ''):
def get_league(self):
'''Gets all of the leagues initial data (teams, roster, matchups, settings)'''
params = {
'view': ['mTeam', 'mRoster', 'mMatchup', 'mSettings']
'view': ['mTeam', 'mRoster', 'mMatchup', 'mSettings', 'mStandings']
}
data = self.league_get(params=params)
return data
Expand Down

0 comments on commit 15e6858

Please sign in to comment.