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

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

            return(result.StatusCode);
        }