Пример #1
0
        public HeoresInfoDto WorstVs(int playerID, int matchCount, bool refresh)
        {
            var data = new HeoresInfoDto();

            if (refresh)
            {
                data.WaitingTime = TaskRegistrator.RegisterMatchListCommand(playerID, null, null, matchCount);
                _unitOfWork.Commit();
                return(data);
            }
            var matches = MatchesRepository.FilteredList(playerID, matchCount);

            if (matches.Count == 0)
            {
                return(null);
            }
            data.Information = CalculationService.GetWorstAgainst(matches);
            return(data);
        }
Пример #2
0
        public HeoresInfoDto BestVs(int playerID, int matchCount, bool refresh)
        {
            var data = new HeoresInfoDto();

            if (refresh)
            {
                data.WaitingTime = TaskRegistrator.RegisterMatchListCommand(playerID, null, null, matchCount);
                //https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V1/?key=893F592E19918CA8A9CB5A847C94E2ED&account_id=48276679&matches_requested=9
                _unitOfWork.Commit();
                return(data);
            }
            var matches = MatchesRepository.FilteredList(playerID, matchCount);

            if (matches.Count == 0)
            {
                return(null);
            }
            data.Information = CalculationService.GetBestAgainst(matches);
            return(data);
        }