diff --git a/espn_api/football/player.py b/espn_api/football/player.py index 635325ca..ac856fde 100644 --- a/espn_api/football/player.py +++ b/espn_api/football/player.py @@ -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 @@ -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})'