예제 #1
0
        public Participant GetOnlyCurrentParticipantData(string name, MatchDetailed match)
        {
            var id = match.ParticipantIdentities.Where(x => x.Player.SummonerName == name).FirstOrDefault().ParticipantId;

            var participant = match.Participants.Where(x => x.ParticipantId == id).FirstOrDefault();

            return(participant);
        }
예제 #2
0
        public MatchDetailed Match(string matchId)
        {
            string        request = requestStringHolder.Match.MatchesByMatchId(matchId);
            string        json    = null;
            MatchDetailed result  = null;

            try
            {
                json = requester.Fetch(request);
                if (json == EXCEEDED_LIMIT)
                {
                    onRateLimitExceeded();
                    return(Match(matchId));
                }
                result = RiotDtoFromJson.GetMatchDetailed(json);
            }
            catch
            {
                Console.WriteLine("Something went wrong in Match(matchId) : Returning null");
                return(null);
            }

            return(result);
        }