public static MatchDto GetMostRecentMatch(string summonerName) { SummonerDto needTheId = GetSummonerMetaByName(summonerName); MatchReferenceDto mostRecentMatch = GetRecentMatchesBySummonerId(needTheId.AccountId).Matches.OrderByDescending(x => x.TimeStamp).First(); return(GetMatchByMatchId(mostRecentMatch.GameId)); }
public static ChampionDto GetMostRecentlyPlayedChamp(string summonerName) { SummonerDto needTheId = GetSummonerMetaByName(summonerName); MatchReferenceDto mostRecentMatch = GetRecentMatchesBySummonerId(needTheId.Id).Matches.OrderByDescending(x => x.TimeStamp).First(); int mostRecentChampId = Convert.ToInt32(mostRecentMatch.Champion); return(GetChampionFromIDHttpClient(mostRecentChampId)); }
public Partida(MatchReferenceDto partida, string invocadorId) { partidaId = partida.gameId; DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc); dataPartida = dtDateTime.AddMilliseconds(partida.timestamp).ToShortDateString(); lane = partida.lane; temporada = partida.season; this.invocadorId = invocadorId; detalhes = getDetalhesAsync(partida.gameId, invocadorId).Result; }