Exemplo n.º 1
0
        Reply ApiSummonerProfile(Request request)
        {
            PrivilegeCheck(request);
            var    arguments          = request.Arguments;
            string regionAbbreviation = (string)request.Arguments[0];
            int    accountId          = (int)request.Arguments[1];
            Worker worker             = GetWorkerByAbbreviation(regionAbbreviation);
            SummonerProfileResult output;
            Summoner summoner = StatisticsService.GetSummoner(worker.Region, accountId);

            if (summoner != null)
            {
                output = new SummonerProfileResult(summoner);
            }
            else
            {
                output = new SummonerProfileResult(OperationResult.NotFound);
            }
            return(GetJSONReply(output));
        }
Exemplo n.º 2
0
 Reply ApiSummonerProfile(Request request)
 {
     PrivilegeCheck(request);
     var arguments = request.Arguments;
     string regionAbbreviation = (string)request.Arguments[0];
     int accountId = (int)request.Arguments[1];
     Worker worker = GetWorkerByAbbreviation(regionAbbreviation);
     SummonerProfileResult output;
     Summoner summoner = StatisticsService.GetSummoner(worker.Region, accountId);
     if (summoner != null)
         output = new SummonerProfileResult(summoner);
     else
         output = new SummonerProfileResult(OperationResult.NotFound);
     return GetJSONReply(output);
 }