public ObfuscatedParticipant(TypedObject to) { super(); this.clientInSynch = to.getBool("clientInSynch"); this.pickMode = to.getInt("pickMode"); this.gameUniqueId = to.getInt("gameUniqueId"); this.badges = to.getInt("badges"); this.index = to.getInt("index"); }
public void fillRankedStats(LeagueSummoner summoner) throws LeagueException { TypedObject obj = call( "getAggregatedStats", new Object[] { summoner.getAccountId(), SUMMONERS_RIFT, LeagueCompetitiveSeason.CURRENT.toString() }); summoner.setRankedStats(new LeagueSummonerRankedStats(obj.getTO("body"))); }
public SpellBookDTO(TypedObject to) { super(); this.summonerId = to.getDouble("summonerId"); this.dateString = to.getString("dateString"); this.bookPages = new ArrayList<SpellBookPageDTO>(); Object[] pages = to.getArray("bookPages"); if (pages != null) { for (Object o : pages) { TypedObject tp = (TypedObject) o; if (tp != null) { bookPages.add(new SpellBookPageDTO(tp)); } } } TypedObject tobj = to.getTO("defaultPage"); this.defaultPage = (tobj == null) ? null : new SpellBookPageDTO(tobj); }
private List<MatchHistoryEntry> getMatchHistoryEntriesFromResult( TypedObject obj, LeagueSummoner summoner) { Object[] games = obj.getTO("body").getArray("gameStatistics"); if (games == null || games.length == 0) // No match history available; return an empty list return new ArrayList<MatchHistoryEntry>(); List<MatchHistoryEntry> recentGames = new ArrayList<MatchHistoryEntry>(); for (Object game : games) { recentGames.add(new MatchHistoryEntry((TypedObject) game, summoner)); } return recentGames; }
public GameNotification(TypedObject to) { this(to.getString("messageCode"), to.getString("type"), to.getString("messageArgument")); }
public TypedObject getTypedObject() { TypedObject res = new TypedObject(getTypeName()); res.put("summonerId", summonerId); res.put("dateString", dateString); Object[] entries = new Object[bookPages.size()]; for (int i = 0; i < entries.length; i++) { SpellBookPageDTO entry = bookPages.get(i); entries[i] = (entry == null) ? null : bookPages.get(i).getTypedObject(); } res.put("bookPages", TypedObject.makeArrayCollection(entries)); if (defaultPage != null) { res.put("defaultPage", defaultPage.getTypedObject()); } /* "sortByPageId":{ "$type":"FluorineFx.ASObject, FluorineFx", "fields":{ "$type":"System.Object[], mscorlib", "$values":[ { "$type":"FluorineFx.ASObject, FluorineFx", "descending":false, "numeric":null, "name":"pageId", "caseInsensitive":false, "compareFunction":null, "TypeName":null } ] }, "unique":false, "compareFunction":null, "TypeName":null }, */ // TODO: check this !! TypedObject f = new TypedObject(); f.put("descending", false); f.put("name", "pageId"); f.put("caseInsensitive", false); f.put("compareFunction", null); f.put("numeric", null); TypedObject t = new TypedObject(); t.put("unique", false); t.put("compareFunction", null); t.put("fields", f); res.put("sortByPageId", t); return res; }