-
Notifications
You must be signed in to change notification settings - Fork 0
SeasonData
Initialization:
- Class
SeasonData
takes the following params:- Region (i.e. na)
- Fantasy season number (starting from 1 to whatever is the current season of fantasy)
As of Spring 2018, the current fantasy season is at 16, so that would be the highest season to input.
Note: The fantasy season number is not to be mistaken for the season number that which league of legends is in.
The regions that the API supports is what lolesports is shown to display for fantasy options which is the following regions:
na, lan, las, euw, eune, oce
>>> from fantasylcs import SeasonData
>>> season = SeasonData("na", 16)
Get season data
- Returns season data
(Output shortened)
>>> season.get_season_data()
{seasonName: "Spring 2018", seasonSplit: "SPRING", seasonBegins: "2018-01-15T00:00:00",…}
Get number of weeks in the fantasy season
- Returns the number of weeks there are during the fantasy season
>>> season.get_number_of_weeks()
9
Get all matches
- Returns a list of all the matches played during the lcs
(Output shortened)
>>> season.get_all_matches()
[
{'id': 1921, 'riotId': "3b78f723-3663-47b0-9f75-59f919dfb9c5", 'week': 1, 'time': "2018-01-19T09:00:00",…}
{'id': 1970, 'riotId': "a8d140aa-cd2d-4d01-8efc-705e6f52f774", 'week': 1, 'time': "2018-01-19T10:00:00",…}
...
...
]
Get all players
- Returns a list of all the players in lcs
(Output shortened)
>>> season.get_all_players()
[
{'id': 1696, 'riotId': 261, 'name': "Boris",…}
{'id': 1697, 'riotId': 774, 'name': "Akaadian",…}
...
...
]
Get all teams
- Returns a list of all the teams in lcs
(Output shortened)
>>> season.get_all_teams()
[
{'id': 191, 'riotId': 33, 'name': "H2K", 'shortName': "H2K", 'flavorTextEntries': [],…}
{'id': 192, 'riotId': 97, 'name': "Splyce", 'shortName': "SPY", 'flavorTextEntries': [],…}
...
...
]
Get all roster lock times
- Returns a dict of the times when rosters get locked in for the week
>>> season.get_all_roster_locks()
{
'1': {
'NA': '2018-01-20T14:00:00',
'EU': '2018-01-19T09:00:00'
},
'2': {
'NA': '2018-01-27T14:00:00',
'EU': '2018-01-26T09:00:00'
},
'3': {
'NA': '2018-02-03T14:00:00',
'EU': '2018-02-02T09:00:00'
},
'4': {
'NA': '2018-02-10T14:00:00',
'EU': '2018-02-09T09:00:00'
},
'5': {
'NA': '2018-02-17T14:00:00',
'EU': '2018-02-16T09:00:00'
},
'6': {
'NA': '2018-02-24T14:00:00',
'EU': '2018-02-23T09:00:00'
},
'7': {
'NA': '2018-03-03T14:00:00',
'EU': '2018-03-02T09:00:00'
},
'8': {
'NA': '2018-03-10T14:00:00',
'EU': '2018-03-09T09:00:00'
},
'9': {
'NA': '2018-03-17T14:00:00',
'EU': '2018-03-16T10:00:00'
}
}
Get roster trends status
- Returns
- true if roster trends are disabled
- false if roster trends are enabled
>>> season.get_roster_trends_status()
False
Get season start time
- Returns the time when the fantasy season begins
>>> season.get_season_start_time()
'2018-01-15T00:00:00'
Get season end time
- Returns the time when the fantasy season ends
>>> season.get_season_end_time()
'2018-03-19T00:00:00'
Get season name
- Returns the season name
>>> season.get_season_name()
'Spring 2018'
Get season split
- Returns the season split
>>> season.get_season_split()
'SPRING'
Get season stats
- Returns a dict of all the stats available
(Output shortened)
>>> season.get_season_stats()
{
'actualPlayerStats': [[1702, 198, 1996, 1, 7, 0, 7, 311, 3, 0, 0, 0, 0], [1807, 197, 1996, 1, 0, 2, 2, 292, 0, 0, 0, 0, 0],…],
'actualTeamStats': [[198, 1996, 1, 1, 9, 1, 2, 1, 0, 1], [197, 1996, 1, 0, 0, 0, 1, 0, 1, 0],…],
'projectedPlayerStats': [[1716, 202, 1936, 1, 1.8, 2.8, 5.7, 238.3, 0, 0, 0, 0, 0],…],
'projectedTeamStats': [[202, 1936, 1, 0, 6, 0.7, 2.4, 1, 0, 0], [206, 1950, 1, 1, 7, 0.9, 2.9, 1, 0, 0],…]
}
Get all actual player stats
- Returns a list of all the actual player stats available
(Output shortened)
>>> season.get_all_actual_player_stats()
{
[[1702, 198, 1996, 1, 7, 0, 7, 311, 3, 0, 0, 0, 0], [1807, 197, 1996, 1, 0, 2, 2, 292, 0, 0, 0, 0, 0],…]
}
Get all actual team stats
- Returns a list of all the actual team stats available
(Output shortened)
>>> season.get_all_actual_team_stats()
{
[[198, 1996, 1, 1, 9, 1, 2, 1, 0, 1], [197, 1996, 1, 0, 0, 0, 1, 0, 1, 0],…]
}
Get all projected player stats
- Returns a list of all the projected player stats available
(Output shortened)
>>> season.get_all_projected_player_stats()
{
[[1716, 202, 1936, 1, 1.8, 2.8, 5.7, 238.3, 0, 0, 0, 0, 0],…]
}
Get all projected team stats
- Returns a list of all the projected team stats available
(Output shortened)
>>> season.get_all_projected_team_stats()
{
[[202, 1936, 1, 0, 6, 0.7, 2.4, 1, 0, 0], [206, 1950, 1, 1, 7, 0.9, 2.9, 1, 0, 0],…]
}