Skip to content

Commit

Permalink
Merge pull request #487 from bnm91/team-owners
Browse files Browse the repository at this point in the history
adding owners to Team
  • Loading branch information
cwendt94 authored Oct 26, 2023
2 parents e9b5420 + ed238bc commit 9f5838d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions espn_api/base_league.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def __init__(self, league_id: int, year: int, sport: str, espn_s2=None, swid=Non
self.league_id = league_id
self.year = year
self.teams = []
self.members = []
self.draft = []
self.player_map = {}

Expand All @@ -38,6 +39,7 @@ def _fetch_league(self, SettingsClass = BaseSettings):
else:
self.current_week = self.scoringPeriodId if self.scoringPeriodId <= data['status']['finalScoringPeriod'] else data['status']['finalScoringPeriod']
self.settings = SettingsClass(data['settings'])
self.members = data.get('members', [])
return data

def _fetch_teams(self, data, TeamClass, pro_schedule = None):
Expand Down
1 change: 1 addition & 0 deletions espn_api/baseball/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __init__(self, data, roster, schedule, year, **kwargs):

self._fetch_roster(roster)
self._fetch_schedule(schedule)
self.owners = data.get('owners', [])

def __repr__(self):
return f'Team({self.team_name})'
Expand Down
1 change: 1 addition & 0 deletions espn_api/basketball/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, data, roster, schedule, year, **kwargs):

self._fetch_roster(roster, year, kwargs.get('pro_schedule'))
self._fetch_schedule(schedule)
self.owners = data.get('owners', [])

def __repr__(self):
return f'Team({self.team_name})'
Expand Down
1 change: 1 addition & 0 deletions espn_api/football/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, data, roster, schedule, year, **kwargs):
self.mov = []
self._fetch_schedule(schedule)
self._fetch_roster(roster, year)
self.owners = data.get('owners', [])

def __repr__(self):
return 'Team(%s)' % (self.team_name, )
Expand Down
1 change: 1 addition & 0 deletions espn_api/hockey/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self, data, roster, schedule, year, **kwargs):

self._fetch_roster(roster)
self._fetch_schedule(schedule)
self.owners = data.get('owners', [])

def __repr__(self):
return 'Team(%s)' % (self.team_name,)
Expand Down
1 change: 1 addition & 0 deletions espn_api/wbasketball/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def __init__(self, data, roster, schedule, year, **kwargs):

self._fetch_roster(roster, year)
self._fetch_schedule(schedule)
self.owners = data.get('owners', [])

def __repr__(self):
return f'Team({self.team_name})'
Expand Down

0 comments on commit 9f5838d

Please sign in to comment.