Package com.gvaneyck.rtmp

Examples of com.gvaneyck.rtmp.TypedObject


            summoner.setActiveGame(game);
        }
    }
   
    public void fillActiveGameData(LeagueSummoner summoner) throws LeagueException {
        TypedObject obj = call("retrieveInProgressSpectatorGameInfo", new Object[] { summoner.getInternalName() });
        createAndSetGame(summoner, obj);
    }
View Full Code Here


    //         return null;
    //     return super.handleResult(result);
    // }
   
    public void fillSoloQueueLeagueData(LeagueSummoner summoner) throws LeagueException {
        TypedObject obj = call("getLeagueForPlayer", new Object[] { summoner.getId(), LeagueMatchmakingQueue.RANKED_SOLO_5x5.toString() });
        if(obj == null || obj.getTO("body") == null) {
            summoner.setLeagueStats(null);
            return;
        }
        summoner.setLeagueStats(new LeagueSummonerLeagueStats(obj.getTO("body")));
    }
View Full Code Here

    public String getServiceName() {
        return "playerStatsService";
    }
   
    public void fillRankedStats(LeagueSummoner summoner) throws LeagueException {
        TypedObject obj = call("getAggregatedStats", new Object[] { summoner.getAccountId(), SUMMONERS_RIFT, LeagueCompetitiveSeason.CURRENT.getNumber() });
        summoner.setRankedStats(new LeagueSummonerRankedStats(obj.getTO("body")));
    }
View Full Code Here

        // IMPORTANT: Riot doesn't provide the summoner names of fellow players, only IDs
        // This means that after calling fillMatchHistory, the match history of the summoner is populated
        // but each match history entry's players only have valid IDs!
        // You have to call SummonerService->getSummonerNames to batch resolve the IDs to names
        // TODO: Automate this process somehow...
        TypedObject obj = call("getRecentGames", new Object[] { summoner.getAccountId() });
        summoner.setMatchHistory(getMatchHistoryEntriesFromResult(obj, summoner));
    }
View Full Code Here

            return null;
        return Arrays.copyOf(names, names.length, String[].class);
    }
   
    public String[] getSummonerNames(Object[] summonerIds) throws LeagueException {
        TypedObject obj = call("getSummonerNames", new Object[] { summonerIds });
        return getNamesFromResult(obj);
    }
View Full Code Here

            }
        });
    }
   
    public LeagueSummoner getSummonerByName(String name) throws LeagueException {
        TypedObject obj = call("getSummonerByName", new Object[] { name });
        return getSummonerFromResult(obj, name);
    }
View Full Code Here

            }
        });
    }
   
    public void fillPublicSummonerData(LeagueSummoner summoner) throws LeagueException {
        TypedObject obj = call("getAllPublicSummonerDataByAccount", new Object[] { summoner.getAccountId() });
        summoner.setProfileInfo(new LeagueSummonerProfileInfo(obj.getTO("body").getTO("summoner")));
    }
View Full Code Here

        int playerTeamId = obj.getInt("teamId");
       
        // Riot doesn't include this person in the "fellow players" list, which I suppose makes sense
        _playerTeam.add(primarySummoner);
        for(Object playerObj : obj.getArray("fellowPlayers")) {
            TypedObject player = (TypedObject)playerObj;
            LeagueSummoner summoner = new LeagueSummoner();
            summoner.setId(player.getInt("summonerId"));
            _playerChampionSelections.put(summoner.getId(), LeagueChampion.getChampionWithId(player.getInt("championId")));
            if(player.getInt("teamId") == playerTeamId)
                _playerTeam.add(summoner);
            else
                _enemyTeam.add(summoner);
        }
       
        for(Object statObj : obj.getArray("statistics")) {
            TypedObject stat = (TypedObject)statObj;
            MatchHistoryStatType type = MatchHistoryStatType.valueOf(stat.getString("statType"));
            _stats.put(type, stat.getInt("value"));
        }
    }
View Full Code Here

    }
   
    public LeagueSummonerRankedStats(TypedObject obj) {
        _stats = new HashMap<Integer, Map<LeagueRankedStatType, Integer>>();
        for(Object o : obj.getArray("lifetimeStatistics")) {
            TypedObject to = (TypedObject)o;
            int champId = to.getInt("championId");
            LeagueRankedStatType type = LeagueRankedStatType.valueOf(to.getString("statType"));
            if(!_stats.containsKey(champId))
                _stats.put(champId, new HashMap<LeagueRankedStatType, Integer>());
            _stats.get(champId).put(type, to.getInt("value"));
        }
    }
View Full Code Here

    public LeagueGame() {
    }
   
    private void fillListWithPlayers(List<LeagueSummoner> list, Object[] team, LeagueSummoner primarySummoner) {
        for(Object o : team) {
            TypedObject to = (TypedObject)o;
            LeagueSummoner sum = new LeagueSummoner(to, primarySummoner.getServer(), true);
            if(sum.isEqual(primarySummoner))
                sum = primarySummoner;
            _summoners.put(sum.getInternalName(), sum);
            list.add(sum);
View Full Code Here

TOP

Related Classes of com.gvaneyck.rtmp.TypedObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.