コード例 #1
0
ファイル: CreepScore.cs プロジェクト: golf1052/CreepScore
        public async Task <MatchDetailAdvanced> RetrieveMatch(CreepScore.Region region, long matchId, bool includeTimeline = false)
        {
            Url url = UrlConstants.UrlBuilder(region, UrlConstants.matchAPIVersion, UrlConstants.matchPart)
                      .AppendPathSegment(matchId.ToString());

            url.SetQueryParams(new
            {
                includeTimeline = includeTimeline.ToString(),
                api_key         = apiKey
            });
            Uri uri = new Uri(url.ToString());

            await GetPermission(region);

            string responseString;

            try
            {
                responseString = await GetWebData(uri);
            }
            catch (CreepScoreException)
            {
                throw;
            }
            return(HelperMethods.LoadMatchDetailAdvanced(JObject.Parse(responseString)));
        }