Esempio n. 1
0
        public async Task <System.Net.HttpStatusCode> DeleteBannedPlayers(BannedPlayer bannedPlayer)
        {
            var httpClient = new HttpClient();
            var encodedTag = HttpUtility.UrlEncode(bannedPlayer.battleTag);
            var result     = await httpClient.DeleteAsync($"{MatchmakingApiUrl}/admin/bannedPlayers/{encodedTag}?secret={MatchmakingAdminSecret}");

            return(result.StatusCode);
        }
Esempio n. 2
0
        public async Task <System.Net.HttpStatusCode> DeleteBannedPlayers(BannedPlayer bannedPlayer)
        {
            var httpClient = new HttpClient();
            var splitTag   = bannedPlayer.battleTag.Split('#');
            var result     = await httpClient.DeleteAsync($"https://api.w3champions.com/admin/bannedPlayers/{splitTag[0] + "%23" + splitTag[1]}?secret=yGBC1w5TcjAQSyOvGTlO4kPGCdJ7dGBKNPkEKQVnqHonGLet4DntoA7PwCgHAiSJ");

            return(result.StatusCode);
        }
Esempio n. 3
0
        public async Task <System.Net.HttpStatusCode> PostBannedPlayers(BannedPlayer bannedPlayer)
        {
            var httpClient  = new HttpClient();
            var encodedTag  = HttpUtility.UrlEncode(bannedPlayer.battleTag);
            var httpcontent = new StringContent(JsonConvert.SerializeObject(bannedPlayer), Encoding.UTF8, "application/json");
            var result      = await httpClient.PostAsync($"{MatchmakingApiUrl}/admin/bannedPlayers/{encodedTag}?secret={MatchmakingAdminSecret}", httpcontent);

            return(result.StatusCode);
        }
Esempio n. 4
0
        public async Task <System.Net.HttpStatusCode> PostBannedPlayers(BannedPlayer bannedPlayer)
        {
            var httpClient  = new HttpClient();
            var splitTag    = bannedPlayer.battleTag.Split('#');
            var httpcontent = new StringContent(JsonConvert.SerializeObject(bannedPlayer), Encoding.UTF8, "application/json");
            var result      = await httpClient.PostAsync($"https://api.w3champions.com/admin/bannedPlayers/{splitTag[0] + "%23" + splitTag[1]}?secret=yGBC1w5TcjAQSyOvGTlO4kPGCdJ7dGBKNPkEKQVnqHonGLet4DntoA7PwCgHAiSJ", httpcontent);

            return(result.StatusCode);
        }