diff --git a/espn_api/base_league.py b/espn_api/base_league.py index 241fe115..7aea1477 100644 --- a/espn_api/base_league.py +++ b/espn_api/base_league.py @@ -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 = {} @@ -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): diff --git a/espn_api/baseball/team.py b/espn_api/baseball/team.py index 13a2f38a..1d98233b 100644 --- a/espn_api/baseball/team.py +++ b/espn_api/baseball/team.py @@ -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})' diff --git a/espn_api/basketball/team.py b/espn_api/basketball/team.py index b1381544..1ab3ae6a 100644 --- a/espn_api/basketball/team.py +++ b/espn_api/basketball/team.py @@ -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})' diff --git a/espn_api/football/team.py b/espn_api/football/team.py index 4c2991f6..2f090057 100644 --- a/espn_api/football/team.py +++ b/espn_api/football/team.py @@ -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, ) diff --git a/espn_api/hockey/team.py b/espn_api/hockey/team.py index f744098c..436fb681 100644 --- a/espn_api/hockey/team.py +++ b/espn_api/hockey/team.py @@ -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,) diff --git a/espn_api/wbasketball/team.py b/espn_api/wbasketball/team.py index 7a72f39c..e935faa1 100644 --- a/espn_api/wbasketball/team.py +++ b/espn_api/wbasketball/team.py @@ -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})'