Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

Parameters:
summonerID summoner to look up current game for
Returns:
the summoner's current game
See also:
Riot API Specification
    public static CurrentGameInfo getCurrentGame(final long summonerID) {
        if(. == null) {
            throw new OriannaException("Must set region for the API using setRegion before the server can be queried!");
        }
        final String request = "/observer-mode/rest/consumer/getSpectatorGameInfo/" + PlatformID.fromRegion(.) + "/" + summonerID;
        try {
            return ..fromJson(BaseRiotAPI.getRoot(requestnullfalse), CurrentGameInfo.class);
        }
        catch(final APIException e) {
            if(e.getStatus() == ..) {
                return null;
            }
            else {
                throw e;
            }
        }
    }
New to GrepCode? Check out our FAQ X