Skip to content

Commit

Permalink
Merge pull request #381 from cwendt94/FB_player_bye
Browse files Browse the repository at this point in the history
FB Player Bye Week
  • Loading branch information
cwendt94 authored Oct 13, 2022
2 parents 5f2adac + 87153eb commit 6ea66b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions espn_api/football/box_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def __init__(self, data, pro_schedule, positional_rankings, week, year):
self.pro_opponent = "None" # professional team playing against
self.pro_pos_rank = 0 # rank of professional team against player position
self.game_played = 100 # 0-100 for percent of game played
self.on_bye_week = False

if 'lineupSlotId' in data:
self.slot_position = POSITION_MAP[data['lineupSlotId']]
Expand All @@ -24,6 +25,8 @@ def __init__(self, data, pro_schedule, positional_rankings, week, year):
if posId in positional_rankings:
self.pro_opponent = PRO_TEAM_MAP[opp_id]
self.pro_pos_rank = positional_rankings[posId][str(opp_id)] if str(opp_id) in positional_rankings[posId] else 0
else: # bye week
self.on_bye_week = True

stats = self.stats.get(week, {})
self.points = stats.get('points', 0)
Expand Down

0 comments on commit 6ea66b3

Please sign in to comment.