viktor v0.0.8 Viktor
Primary interface to the League of Legends API. For convenience’s sake, endpoint methods may be called directly from
this module. In some cases, the method names aren’t 1:1 (e.g. Viktor.ranked_stats delegates to
Viktor.Operation.Stats.ranked), so be sure to read the documentation.
Examples
Viktor.start_link
current_game = Viktor.current_game("na", 21066)
current_game_without_delegate = Viktor.Operation.CurrentGame.current_game("na", 21066)
Summary
Functions
API Key
Get challenger tier leagues
Retrieve champion by ID
Gets all champion masteries for a summoner
Gets all champion masteries for a summoner
Retrieve all champions
Get current game information for the given summoner ID
Get list of featured_games
Get league entries mapped by summoner ID for a given list of summoner IDs
Get leagues mapped by summoner ID for a given list of summoner IDs
Get master tier leagues
Get a player’s total champion mastery score, which is sum of individual champion mastery levels
Retrieve match by match ID
Retrieve match by match ID. Includes timeline if flag set to true
Retrieve match list by summoner ID
Retrieve match list by summoner ID and filter params as keywords. Available filters
Get ranked stats by summoner ID for current season
Get ranked stats by summoner ID and season
Get recent games by summoner ID
Get player stats summaries by summoner ID for current season
Get player stats summaries by summoner ID and season
Get league entries mapped by team ID for a given list of team IDs
Get leagues mapped by team ID for a given list of team IDs
Get specified number of top champion mastery entries sorted by number of champion points descending
Functions
Get challenger tier leagues.
Examples
challenger_league = Viktor.challenger_league("na", "RANKED_SOLO_5x5")
Gets all champion masteries for a summoner.
Examples
masteries = Viktor.champion_masteries("na", 21066)
Gets all champion masteries for a summoner.
Examples
mastery = Viktor.champion_mastery("na", 21066, 1)
Retrieve all champions.
Examples
All Champions
all_champions = Viktor.champion("na")
free_champions = Viktor.champion("na", true)
Get current game information for the given summoner ID.
Examples
current_game = Viktor.current_game("na", 21066)
Get list of featured_games.
Examples
featured_games = Viktor.featured_games("na")
Get league entries mapped by summoner ID for a given list of summoner IDs.
Examples
league_entries = Viktor.league_entries("na", "21066")
Get leagues mapped by summoner ID for a given list of summoner IDs.
Examples
leagues = Viktor.leagues("na", "21066")
Get master tier leagues.
Examples
master_league = Viktor.master_league("na", "RANKED_SOLO_5x5")
Get a player’s total champion mastery score, which is sum of individual champion mastery levels.
Examples
mastery_score = Viktor.mastery_score("na", 21066)
Retrieve match by match ID. Includes timeline if flag set to true.
Examples
match = Viktor.match("na", 2077473238, true)
Retrieve match list by summoner ID.
Examples
match_list = Viktor.match_list("na", 21066)
Retrieve match list by summoner ID and filter params as keywords. Available filters:
championIds- Comma-separated list of champion IDs to use for fetching games.rankedQueues- Comma-separated list of ranked queue types to use for fetching games. Non-ranked queue types will be ignored.TEAM_BUILDER_DRAFT_RANKED_5x5,RANKED_SOLO_5x5,RANKED_TEAM_3x3,RANKED_TEAM_5x5
seasons- Comma-separated list of seasons to use for fetching games.PRESEASON3,SEASON3,PRESEASON2014,SEASON2014,PRESEASON2015,SEASON2015,PRESEASON2016,SEASON2016
beginTime- The begin time to use for fetching games specified as epoch milliseconds.endTime- The end time to use for fetching games specified as epoch milliseconds.beginIndex- The begin index to use for fetching games.endIndex- The end index to use for fetching games.
Per Riot: It is up to the caller to ensure that the combination of filter parameters provided is valid for the
requested summoner, otherwise, no matches may be returned. If either of the beginTime or endTime parameters is
set, they must both be set, although there is no maximum limit on their range. If the beginTime parameter is
specified on its own, endTime is assumed to be the current time. If the endTime parameter is specified on its own,
beginTime is assumed to be the start of the summoner’s match history.
Examples
some_seasons = Viktor.match_list("na", 21066, [seasons: "SEASON2014,SEASON2015,SEASON2016" ])
some_ranked_queues = Viktor.match_list("na", 21066, [rankedQueues: "RANKED_SOLO_5x5,TEAM_BUILDER_DRAFT_RANKED_5x5" ])
combo = Viktor.match_list("na", 21066, [championIds: "7", seasons: "PRESEASON2015", beginIndex: 0, endIndex: 5])
Get ranked stats by summoner ID for current season.
ranked = Viktor.ranked_stats("na", 21066)
Get ranked stats by summoner ID and season.
season_3 = Viktor.ranked_stats("na", 21066, "SEASON3")
season_4 = Viktor.ranked_stats("na", 21066, "SEASON2014")
season_5 = Viktor.ranked_stats("na", 21066, "SEASON2015")
season_6 = Viktor.ranked_stats("na", 21066, "SEASON2016")
Get recent games by summoner ID.
Examples
recent_games = Viktor.recent_games("na", 21066)
Get player stats summaries by summoner ID for current season.
summary = Viktor.summary_stats("na", 21066)
Get player stats summaries by summoner ID and season.
season_3 = Viktor.summary_stats("na", 21066, "SEASON3")
season_4 = Viktor.summary_stats("na", 21066, "SEASON2014")
season_5 = Viktor.summary_stats("na", 21066, "SEASON2015")
season_6 = Viktor.summary_stats("na", 21066, "SEASON2016")
Get league entries mapped by team ID for a given list of team IDs.
Examples
team_league_entries = Viktor.team_league_entries("na", "TEAM-fa073ee0-51ca-11e4-82cc-782bcb4d0bb2")
Get leagues mapped by team ID for a given list of team IDs.
Examples
team_leagues = Viktor.team_leagues("na", "TEAM-fa073ee0-51ca-11e4-82cc-782bcb4d0bb2")