Skip to content

Commit

Permalink
Merge pull request #608 from cwendt94/football_teams_season_stats
Browse files Browse the repository at this point in the history
Football Team Season Stats
  • Loading branch information
cwendt94 authored Nov 8, 2024
2 parents cc05805 + 3b1cf3c commit e4a0dd3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions espn_api/football/team.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .player import Player
from .constant import PLAYER_STATS_MAP

class Team(object):
'''Teams are part of the league'''
Expand Down Expand Up @@ -38,6 +39,7 @@ def __init__(self, data, roster, schedule, year, **kwargs):
self._fetch_schedule(schedule)
self._fetch_roster(roster, year, kwargs.get('pro_schedule'))
self.owners = kwargs.get('owners', [])
self.stats = {PLAYER_STATS_MAP.get(int(i), i): j for i, j in data.get('valuesByStat', {}).items()}

def __repr__(self):
return 'Team(%s)' % (self.team_name, )
Expand Down

0 comments on commit e4a0dd3

Please sign in to comment.