From 4c12b4c4d7c2ef2fa4c72807f4f1542e1277be7a Mon Sep 17 00:00:00 2001 From: Justin Skiles Date: Wed, 12 Apr 2023 08:11:08 -0400 Subject: [PATCH] Removed method which binds to non-existent endpoint after Valve removed it. Fixed issue with GetLiveLeagueGames deserialization. --- .../DOTA2/LiveLeagueGamePlayerDetailModel.cs | 12 ++++++------ src/Steam.UnitTests/DOTA2EconTests.cs | 8 -------- src/SteamWebAPI2/Interfaces/DOTA2Econ.cs | 18 ------------------ src/SteamWebAPI2/Interfaces/IDOTA2Econ.cs | 2 -- .../DOTA2/LiveLeagueGameResultContainer.cs | 12 ++++++------ 5 files changed, 12 insertions(+), 40 deletions(-) diff --git a/src/Steam.Models/DOTA2/LiveLeagueGamePlayerDetailModel.cs b/src/Steam.Models/DOTA2/LiveLeagueGamePlayerDetailModel.cs index 50a123e..27a5c48 100644 --- a/src/Steam.Models/DOTA2/LiveLeagueGamePlayerDetailModel.cs +++ b/src/Steam.Models/DOTA2/LiveLeagueGamePlayerDetailModel.cs @@ -16,12 +16,12 @@ public class LiveLeagueGamePlayerDetailModel public uint ExperiencePerMinute { get; set; } public uint UltimateState { get; set; } public uint UltimateCooldown { get; set; } - public uint Item0 { get; set; } - public uint Item1 { get; set; } - public uint Item2 { get; set; } - public uint Item3 { get; set; } - public uint Item4 { get; set; } - public uint Item5 { get; set; } + public int Item0 { get; set; } + public int Item1 { get; set; } + public int Item2 { get; set; } + public int Item3 { get; set; } + public int Item4 { get; set; } + public int Item5 { get; set; } public uint RespawnTimer { get; set; } public double PositionX { get; set; } public double PositionY { get; set; } diff --git a/src/Steam.UnitTests/DOTA2EconTests.cs b/src/Steam.UnitTests/DOTA2EconTests.cs index 14d856c..8808b92 100644 --- a/src/Steam.UnitTests/DOTA2EconTests.cs +++ b/src/Steam.UnitTests/DOTA2EconTests.cs @@ -19,14 +19,6 @@ public DOTA2EconTests() steamInterface = factory.CreateSteamWebInterface(new HttpClient()); } - [Fact] - public async Task GetGameItemsAsync_Should_Succeed() - { - var response = await steamInterface.GetGameItemsAsync(); - Assert.NotNull(response); - Assert.NotNull(response.Data); - } - [Fact] public async Task GetHeroesAsync_Should_Succeed() { diff --git a/src/SteamWebAPI2/Interfaces/DOTA2Econ.cs b/src/SteamWebAPI2/Interfaces/DOTA2Econ.cs index 9e69861..0128fe2 100644 --- a/src/SteamWebAPI2/Interfaces/DOTA2Econ.cs +++ b/src/SteamWebAPI2/Interfaces/DOTA2Econ.cs @@ -31,24 +31,6 @@ public DOTA2Econ(IMapper mapper, ISteamWebRequest steamWebRequest, ISteamWebInte this.dota2TestWebInterface = new SteamWebInterface("IEconDOTA2_205790", steamWebRequest); } - /// - /// Returns a collection of in game Dota 2 items. Example: blink dagger. - /// - /// - /// - public async Task>> GetGameItemsAsync(string language = "en_us") - { - List parameters = new List(); - - parameters.AddIfHasValue(language, "language"); - - var steamWebResponse = await dota2WebInterface.GetAsync("GetGameItems", 1, parameters); - - var steamWebResponseModel = mapper.Map, ISteamWebResponse>>(steamWebResponse); - - return steamWebResponseModel; - } - /// /// Returns a collection of heroes and basic hero data. /// diff --git a/src/SteamWebAPI2/Interfaces/IDOTA2Econ.cs b/src/SteamWebAPI2/Interfaces/IDOTA2Econ.cs index 115d794..7e895f9 100644 --- a/src/SteamWebAPI2/Interfaces/IDOTA2Econ.cs +++ b/src/SteamWebAPI2/Interfaces/IDOTA2Econ.cs @@ -7,8 +7,6 @@ namespace SteamWebAPI2.Interfaces { public interface IDOTA2Econ { - Task>> GetGameItemsAsync(string language = ""); - Task>> GetHeroesAsync(string language = "", bool itemizedOnly = false); Task>> GetRaritiesAsync(string language = ""); diff --git a/src/SteamWebAPI2/Models/DOTA2/LiveLeagueGameResultContainer.cs b/src/SteamWebAPI2/Models/DOTA2/LiveLeagueGameResultContainer.cs index 399bb02..2dbda09 100644 --- a/src/SteamWebAPI2/Models/DOTA2/LiveLeagueGameResultContainer.cs +++ b/src/SteamWebAPI2/Models/DOTA2/LiveLeagueGameResultContainer.cs @@ -192,12 +192,12 @@ internal class LiveLeagueGamePlayerDetail [JsonProperty(PropertyName = "ultimate_cooldown")] public uint UltimateCooldown { get; set; } - public uint Item0 { get; set; } - public uint Item1 { get; set; } - public uint Item2 { get; set; } - public uint Item3 { get; set; } - public uint Item4 { get; set; } - public uint Item5 { get; set; } + public int Item0 { get; set; } + public int Item1 { get; set; } + public int Item2 { get; set; } + public int Item3 { get; set; } + public int Item4 { get; set; } + public int Item5 { get; set; } [JsonProperty(PropertyName = "respawn_timer")] public uint RespawnTimer { get; set; }