-
Notifications
You must be signed in to change notification settings - Fork 224
League Class Basketball
Christian Wendt edited this page Sep 16, 2020
·
9 revisions
The League Object is used for getting all of your ESPN Fantasy data including teams, roster, players, scoreboards.
Set debug parameter to True if you want to see all of the ESPN API requests and responses print to the console
from espn_api.basketball import League
league = League(league_id: int, year: int, espn_s2: str = None, swid: str = None, username: str = None, password: str = None, debug=False)
league_id: int
year: int
teams: List[Team]
Returns basic information on a match up for a current week. This can be used for previous years
Check out Matchup Class!
def scoreboard(week: int = None) -> List[Matchup]
Returns a list of Activities
# msg_type inputs: 'FA', 'WAVIER', 'TRADED'
def recent_activity(size: int = 25, msg_type: str = None) -> List[Activity]:
Helper functions
def standings() -> List[Team]:
def get_team_data(team_id: int) -> Team: