Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.robrua.orianna.api.core;
 
 
 
public abstract class CurrentGameAPI {
    

Parameters:
summonerID the ID of the summoner to get current game for
Returns:
the summoner's current game or null if they aren't in one
    public static CurrentGame getCurrentGame(final long summonerID) {
        final com.robrua.orianna.type.dto.currentgame.CurrentGameInfo game = BaseRiotAPI.getCurrentGame(summonerID);
        if(game == null) {
            return null;
        }
        if(. == .) {
            RiotAPI.getChampions(new ArrayList<>(game.getChampionIDs()));
            RiotAPI.getMasteries(new ArrayList<>(game.getMasteryIDs()));
            RiotAPI.getRunes(new ArrayList<>(game.getRuneIDs()));
            RiotAPI.getSummonerSpells(new ArrayList<>(game.getSummonerSpellIDs()));
            RiotAPI.getSummonersByID(new ArrayList<>(game.getSummonerIDs()));
        }
        return new CurrentGame(game);
    }

    

Parameters:
summonerName the name of the summoner to get current game for
Returns:
the summoner's current game or null if they aren't in one
    public static CurrentGame getCurrentGame(final String summonerName) {
        return getCurrentGame(RiotAPI.getSummonerByName(summonerName));
    }

    

Parameters:
summoner the summoner to get current game for
Returns:
the summoner's current game or null if they aren't in one
    public static CurrentGame getCurrentGame(final Summoner summoner) {
        return getCurrentGame(summoner.getID());
    }
New to GrepCode? Check out our FAQ X