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); }
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); }
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); }
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); }