Skip to content

Commit

Permalink
Merge pull request #363 from Kjeldgaard/onTeamId
Browse files Browse the repository at this point in the history
Add onTeamId to player object
  • Loading branch information
cwendt94 authored Sep 26, 2022
2 parents d8cf587 + 8ab4e9c commit 1dda8f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion espn_api/football/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def __init__(self, data, year):
self.acquisitionType = json_parsing(data, 'acquisitionType')
self.proTeam = PRO_TEAM_MAP[json_parsing(data, 'proTeamId')]
self.injuryStatus = json_parsing(data, 'injuryStatus')
self.onTeamId = json_parsing(data, 'onTeamId')
self.stats = {}

# Get players main position
Expand Down Expand Up @@ -43,6 +44,6 @@ def __init__(self, data, year):
self.stats[scoring_period] = {points_type: points, breakdown_type: breakdown}
self.total_points = self.stats.get(0, {}).get('points', 0)
self.projected_total_points = self.stats.get(0, {}).get('projected_points', 0)

def __repr__(self):
return f'Player({self.name})'

0 comments on commit 1dda8f4

Please sign in to comment.