Skip to content

Commit

Permalink
Merge pull request #339 from cwendt94/fb_playoff_matchup
Browse files Browse the repository at this point in the history
Add matchup type and is playoff
  • Loading branch information
cwendt94 committed Jul 6, 2022
2 parents efd30f4 + bd55696 commit 7d84097
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions espn_api/football/box_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
class BoxScore(object):
''' '''
def __init__(self, data, pro_schedule, positional_rankings, week, year):
self.matchup_type = data.get('playoffTierType', 'NONE')
self.is_playoff = self.matchup_type != 'None'

self.home_team = data['home']['teamId']
self.home_projected = -1 # week is over/not set
if 'totalPointsLive' in data['home']:
Expand Down
2 changes: 2 additions & 0 deletions espn_api/football/matchup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def _fetch_matchup_info(self):
'''Fetch info for matchup'''
self.home_team = self.data['home']['teamId']
self.home_score = self.data['home']['totalPoints']
self.matchup_type = self.data.get('playoffTierType', 'NONE')
self.is_playoff = self.matchup_type != 'None'

# For Leagues with bye weeks
self.away_team = 0
Expand Down

0 comments on commit 7d84097

Please sign in to comment.