Skip to content

Commit

Permalink
Merge pull request #180 from cwendt94/BaskeballPlayerInjuryBug
Browse files Browse the repository at this point in the history
Fix Basketball Player Injury Status
  • Loading branch information
cwendt94 authored Jan 26, 2021
2 parents 42b030a + a838fd7 commit 20aa677
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions espn_api/basketball/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def __init__(self, data):
# I think 0120XX, 0220XX, and 0320XX are last 7, last 15, and last 30
# but I haven't figured out which yet (too season in season!)
player = data['playerPoolEntry']['player'] if 'playerPoolEntry' in data else data['player']
self.injuryStatus = player.get('injuryStatus', self.injuryStatus)
self.injured = player.get('injured', False)

for split in player.get('stats', []):
if split['stats']:
self.stats[split['id']] = {}
Expand Down

0 comments on commit 20aa677

Please sign in to comment.