Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.robrua.orianna.api.dto;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.robrua.orianna.type.api.Action;
import com.robrua.orianna.type.api.RateLimit;
import com.robrua.orianna.type.core.common.QueueType;
import com.robrua.orianna.type.core.common.Region;
import com.robrua.orianna.type.core.common.Season;
import com.robrua.orianna.type.dto.currentgame.CurrentGameInfo;
import com.robrua.orianna.type.dto.featuredgames.FeaturedGames;
import com.robrua.orianna.type.dto.game.RecentGames;
import com.robrua.orianna.type.dto.league.League;
import com.robrua.orianna.type.dto.match.MatchDetail;
import com.robrua.orianna.type.dto.matchhistory.PlayerHistory;
import com.robrua.orianna.type.dto.staticdata.Item;
import com.robrua.orianna.type.dto.staticdata.ItemList;
import com.robrua.orianna.type.dto.staticdata.LanguageStrings;
import com.robrua.orianna.type.dto.staticdata.MapData;
import com.robrua.orianna.type.dto.staticdata.Mastery;
import com.robrua.orianna.type.dto.staticdata.MasteryList;
import com.robrua.orianna.type.dto.staticdata.Realm;
import com.robrua.orianna.type.dto.staticdata.Rune;
import com.robrua.orianna.type.dto.staticdata.RuneList;
import com.robrua.orianna.type.dto.staticdata.SummonerSpell;
import com.robrua.orianna.type.dto.staticdata.SummonerSpellList;
import com.robrua.orianna.type.dto.stats.PlayerStatsSummaryList;
import com.robrua.orianna.type.dto.stats.RankedStats;
import com.robrua.orianna.type.dto.status.Shard;
import com.robrua.orianna.type.dto.status.ShardStatus;
import com.robrua.orianna.type.dto.summoner.MasteryPages;
import com.robrua.orianna.type.dto.summoner.RunePages;
import com.robrua.orianna.type.dto.summoner.Summoner;
import com.robrua.orianna.type.dto.team.Team;
import com.robrua.orianna.type.exception.APIException;
/**
* Queries the LoL REST
* API asynchronously
*
* @author Rob Rua (FatalElement - NA) ([email protected])
*/
public class AsyncBaseRiotAPI {
/**
* @param action
* what to do with the challenger league
* @param queueType
* the queue type to get the challenger league for
* @see Riot
* API Specification
*/
public static void getChallenger(final Action action, final QueueType queueType) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
LeagueAPI.getChallenger(queueType);
}
else {
try {
action.perform(LeagueAPI.getChallenger(queueType));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the champion
* @param ID
* the champion's ID
* @see Riot
* API Specification
*/
public static void getChampion(final Action action, final long ID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getChampion(ID);
}
else {
try {
action.perform(StaticDataAPI.getChampion(ID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the list all of champions
* @see Riot
* API Specification
*/
public static void getChampions(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getChampions();
}
else {
try {
action.perform(StaticDataAPI.getChampions());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the champion
* @param ID
* the ID of the champion to look up
* @see Riot
* API Specification
*/
public static void getChampionStatus(final Action action, final long ID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
ChampionAPI.getChampionStatus(ID);
}
else {
try {
action.perform(ChampionAPI.getChampionStatus(ID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with all champions
* @param freeToPlay
* whether to only return free champions
* @see Riot
* API Specification
*/
public static void getChampionStatuses(final Action action, final boolean freeToPlay) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
ChampionAPI.getChampionStatuses(freeToPlay);
}
else {
try {
action.perform(ChampionAPI.getChampionStatuses(freeToPlay));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the summoner's current game
* @param summonerID
* summoner to look up current game for
* @see Riot
* API Specification
*/
public static void getCurrentGame(final Action action, final long summonerID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
CurrentGameAPI.getCurrentGame(summonerID);
}
else {
try {
action.perform(CurrentGameAPI.getCurrentGame(summonerID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the featured games
* @see Riot
* API Specification
*/
public static void getFeaturedGames(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
FeaturedGamesAPI.getFeaturedGames();
}
else {
try {
action.perform(FeaturedGamesAPI.getFeaturedGames());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the item
* @param ID
* the item's ID
* @see Riot
* API Specification
*/
public static void getItem(final Action action, final long ID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getItem(ID);
}
else {
try {
action.perform(StaticDataAPI.getItem(ID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the list of all items
* @see Riot
* API Specification
*/
public static void getItems(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getItems();
}
else {
try {
action.perform(StaticDataAPI.getItems());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the languages
* @see Riot
* API Specification
*/
public static void getLanguages(final Action> action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getLanguages();
}
else {
try {
action.perform(StaticDataAPI.getLanguages());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the language strings
* @see Riot
* API Specification
*/
public static void getLanguageStrings(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getLanguageStrings();
}
else {
try {
action.perform(StaticDataAPI.getLanguageStrings());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the map information
* @see Riot
* API Specification
*/
public static void getMapInformation(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getMapInformation();
}
else {
try {
action.perform(StaticDataAPI.getMapInformation());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the list of all masteries
* @see Riot
* API Specification
*/
public static void getMasteries(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getMasteries();
}
else {
try {
action.perform(StaticDataAPI.getMasteries());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the mastery
* @param ID
* the mastery's ID
* @see Riot
* API Specification
*/
public static void getMastery(final Action action, final long ID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getMastery(ID);
}
else {
try {
action.perform(StaticDataAPI.getMastery(ID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match
* @param ID
* the ID of the match to look up
* @see Riot
* API Specification
*/
public static void getMatch(final Action action, final long ID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchAPI.getMatch(ID);
}
else {
try {
action.perform(MatchAPI.getMatch(ID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches after beginIndex for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @param beginIndex
* the game index to start from
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID, final int beginIndex) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID, beginIndex);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID, beginIndex));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches after beginIndex for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @param beginIndex
* the game index to start from
* @param championIDs
* the champions to limit games to
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID, final int beginIndex, final List championIDs) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID, beginIndex, championIDs);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID, beginIndex, championIDs));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches after beginIndex for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @param beginIndex
* the game index to start from
* @param queueType
* the queue type to limit games to (only ranked queues)
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID, final int beginIndex, final QueueType queueType) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID, beginIndex, queueType);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID, beginIndex, queueType));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches after beginIndex for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @param beginIndex
* the game index to start from
* @param queueType
* the queue type to limit games to (only ranked queues)
* @param championIDs
* the champions to limit games to
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID, final int beginIndex, final QueueType queueType,
final List championIDs) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID, beginIndex, queueType, championIDs);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID, beginIndex, queueType, championIDs));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @param championIDs
* the champions to limit games to
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID, final List championIDs) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID, championIDs);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID, championIDs));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @param queueType
* the queue type to limit games to (only ranked queues)
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID, final QueueType queueType) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID, queueType);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID, queueType));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the match history for that summoner Gets the
* 15 most recent matches for the summoner
*
* @param summonerID
* the ID of the summoner to get match history for
* @param queueType
* the queue type to limit games to (only ranked queues)
* @param championIDs
* the champions to limit games to
* @see Riot
* API Specification
*/
public static void getMatchHistory(final Action action, final long summonerID, final QueueType queueType, final List championIDs) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
MatchHistoryAPI.getMatchHistory(summonerID, queueType, championIDs);
}
else {
try {
action.perform(MatchHistoryAPI.getMatchHistory(summonerID, queueType, championIDs));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the ranked stats for that summoner
* @param summonerID
* the ID of the summoner to get ranked stats for
* @see Riot
* API Specification
*/
public static void getRankedStats(final Action action, final long summonerID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StatsAPI.getRankedStats(summonerID);
}
else {
try {
action.perform(StatsAPI.getRankedStats(summonerID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the ranked stats for that summoner
* @param summonerID
* the ID of the summoner to get ranked stats for
* @param season
* the season to get stats for
* @see Riot
* API Specification
*/
public static void getRankedStats(final Action action, final long summonerID, final Season season) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StatsAPI.getRankedStats(summonerID, season);
}
else {
try {
action.perform(StatsAPI.getRankedStats(summonerID, season));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the realm
* @see Riot
* API Specification
*/
public static void getRealm(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getRealm();
}
else {
try {
action.perform(StaticDataAPI.getRealm());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the summoner's recent games
* @param summonerID
* the ID of the summoner to look up recent games for
* @see Riot
* API Specification
*/
public static void getRecentGames(final Action action, final long summonerID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
GameAPI.getRecentGames(summonerID);
}
else {
try {
action.perform(GameAPI.getRecentGames(summonerID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the rune
* @param ID
* the rune's ID
* @see Riot
* API Specification
*/
public static void getRune(final Action action, final long ID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getRune(ID);
}
else {
try {
action.perform(StaticDataAPI.getRune(ID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the list of all runes
* @see Riot
* API Specification
*/
public static void getRunes(final Action action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StaticDataAPI.getRunes();
}
else {
try {
action.perform(StaticDataAPI.getRunes());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the shard
* @param region
* the region's shard to get
* @see Riot
* API Specification
*/
public static void getShard(final Action action, final Region region) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StatusAPI.getShard(region);
}
else {
try {
action.perform(StatusAPI.getShard(region));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the list of all shards
* @see Riot
* API Specification
*/
public static void getShards(final Action> action) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StatusAPI.getShards();
}
else {
try {
action.perform(StatusAPI.getShards());
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the stats for that summoner
* @param summonerID
* the ID of the summoner to get stats for
* @see Riot
* API Specification
*/
public static void getStats(final Action action, final long summonerID) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StatsAPI.getStats(summonerID);
}
else {
try {
action.perform(StatsAPI.getStats(summonerID));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the stats for that summoner
* @param summonerID
* the ID of the summoner to get stats for
* @param season
* the season to get stats for
* @see Riot
* API Specification
*/
public static void getStats(final Action action, final long summonerID, final Season season) {
new Thread(new Runnable() {
@Override
public void run() {
if(action == null) {
StatsAPI.getStats(summonerID, season);
}
else {
try {
action.perform(StatsAPI.getStats(summonerID, season));
}
catch(final APIException e) {
action.handle(e);
}
}
}
}).start();
}
/**
* @param action
* what to do with the summoners' league entries
* @param summonerIDs
* the summoners to get league entries for
* @see Riot
* API Specification
*/
public static void getSummonerLeagueEntries(final Action