public class CurrentGame_v1_0 extends java.lang.Object implements RiotApi.CurrentGame
RiotApi.Champion, RiotApi.ChampionMastery, RiotApi.CurrentGame, RiotApi.FeaturedGames, RiotApi.League, RiotApi.LolStatus, RiotApi.Match, RiotApi.MatchList, RiotApi.RateType, RiotApi.RecentGames, RiotApi.StaticData, RiotApi.Stats, RiotApi.Summoner, RiotApi.Team| Modifier and Type | Field and Description |
|---|---|
protected ApiKey |
apiKey |
protected com.squareup.okhttp.OkHttpClient |
client |
protected Region |
region |
| Constructor and Description |
|---|
CurrentGame_v1_0(ApiKey apiKey,
Region region) |
| Modifier and Type | Method and Description |
|---|---|
ApiKey |
getApiKey() |
Region |
getRegion() |
CurrentGameInfo |
getSpectatorInfo(long summonerId)
/observer-mode/rest/consumer/getSpectatorGameInfo/{platformId}/{summonerId}
403 Forbidden 429 Rate limit exceeded |
float |
getVersion() |
void |
setAutoRetry(boolean autoRetry) |
void |
setPrintUrl(boolean printUrls) |
void |
setProxy(java.net.Proxy proxy) |
void |
setRateControl(boolean control)
Enable or disable rate throttling.
|
void |
setRetryCount(int retryCount) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedRegionsgetApiKey, getRateType, getRegion, setAutoRetry, setPrintUrl, setProxy, setRateControl, setRetryCountprotected final ApiKey apiKey
protected final Region region
protected final com.squareup.okhttp.OkHttpClient client
public float getVersion()
getVersion in interface RiotApiRiotApi instancepublic CurrentGameInfo getSpectatorInfo(long summonerId) throws java.io.IOException, HttpException
RiotApi.CurrentGamegetSpectatorInfo in interface RiotApi.CurrentGamesummonerId - summoner id numberCurrentGameInfo objectjava.io.IOException - some connection error (e.g. server down)HttpException - non 2XX response code returnedpublic Region getRegion()
public ApiKey getApiKey()
public void setProxy(java.net.Proxy proxy)
public void setPrintUrl(boolean printUrls)
setPrintUrl in interface RiotApiprintUrls - turn off/on URL printing. Mainly for debuggingpublic void setAutoRetry(boolean autoRetry)
setAutoRetry in interface RiotApiautoRetry - whether this RiotApi instance should
automatically retry failed requestspublic void setRetryCount(int retryCount)
setRetryCount in interface RiotApiretryCount - number of automatic retries to attempt. If
RiotApi.setAutoRetry(boolean) is false this this has no effect.public void setRateControl(boolean control)
RiotApisetRateControl in interface RiotApicontrol - turn on / off rate controlling