CreateGetRequestAsync() public method

public CreateGetRequestAsync ( string relativeUrl, Region region, List addedArguments = null, bool useHttps = true ) : Task
relativeUrl string
region Region
addedArguments List
useHttps bool
return Task
Example #1
0
        /// <summary>
        ///     Returns the details of a certain tournament code.
        /// </summary>
        /// <param name="tournamentCode">The tournament code in string format.</param>
        /// <returns>TournamentCodeDetail object with details of the tournament code.</returns>
        public async Task <TournamentCodeDetail> GetTournamentCodeDetailsAsync(string tournamentCode)
        {
            var json =
                await
                requester.CreateGetRequestAsync(TournamentRootUrl + string.Format(GetCodeUrl, tournamentCode),
                                                Region.global);

            return(await Task.Factory.StartNew(() => JsonConvert.DeserializeObject <TournamentCodeDetail>(json)));
        }