/// <summary>
        /// Obtiene los detalles de una lista de matches
        /// </summary>
        /// <param name="matchesList"></param>
        /// <returns></returns>
        private async Task <List <MatchDetail> > GetMatchDetailsListAsync(MatchesList matchesList)
        {
            var result = new List <MatchDetail>();

            foreach (Match match in matchesList.Matches)
            {
                result.Add(await _riotService.GetMatchDetail(match.GameId));
            }
            return(result);
        }
Пример #2
0
 public async Task <ActionResult> GetMatchDetail(long matchId)
 {
     try
     {
         return(Ok(await _riotService.GetMatchDetail(matchId)));
     }
     catch (HttpRequestException ex)
     {
         return(BadRequest(ex));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex));
     }
 }