Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Football Team Season Stats #608

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading