コード例 #1
0
ファイル: Handler.cs プロジェクト: worm929/RiotControl
        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));
        }
コード例 #2
0
ファイル: Handler.cs プロジェクト: christallire/RiotControl
 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);
 }