From 3299d25ee3d112d14475361eae294f64b9859efa Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 14 Aug 2018 12:07:15 -0400 Subject: drop backwards compatibility in update-check API Update checks from older versions of SMAPI are never useful now that Stardew Valley 1.3 is released: older versions of SMAPI won't launch in Stardew Valley 1.3 (so they won't check for updates), and newer versions of SMAPI/mods won't work with older versions of the game. --- .../Framework/Clients/WebApi/ModEntryModel.cs | 44 ---------------------- .../Framework/Clients/WebApi/ModSeachModel.cs | 5 --- 2 files changed, 49 deletions(-) (limited to 'src/StardewModdingAPI.Toolkit/Framework/Clients') diff --git a/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs index f3f22b93..2aafe199 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModEntryModel.cs @@ -1,6 +1,3 @@ -using System; -using Newtonsoft.Json; - namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi { /// Metadata about a mod. @@ -26,46 +23,5 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi /// The errors that occurred while fetching update data. public string[] Errors { get; set; } = new string[0]; - - /**** - ** Backwards-compatible fields - ****/ - /// The mod's latest version number. - [Obsolete("Use " + nameof(ModEntryModel.Main))] - [JsonProperty] - internal string Version { get; private set; } - - /// The mod's web URL. - [Obsolete("Use " + nameof(ModEntryModel.Main))] - [JsonProperty] - internal string Url { get; private set; } - - /// The mod's latest optional release, if newer than . - [Obsolete("Use " + nameof(ModEntryModel.Optional))] - [JsonProperty] - internal string PreviewVersion { get; private set; } - - /// The web URL to the mod's latest optional release, if newer than . - [Obsolete("Use " + nameof(ModEntryModel.Optional))] - [JsonProperty] - internal string PreviewUrl { get; private set; } - - - /********* - ** Public methods - *********/ - /// Set backwards-compatible fields. - /// The requested API version. - public void SetBackwardsCompatibility(ISemanticVersion version) - { - if (version.IsOlderThan("2.6-beta.19")) - { - this.Version = this.Main?.Version?.ToString(); - this.Url = this.Main?.Url; - - this.PreviewVersion = this.Optional?.Version?.ToString(); - this.PreviewUrl = this.Optional?.Url; - } - } } } diff --git a/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSeachModel.cs b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSeachModel.cs index df0d8457..e352e1cc 100644 --- a/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSeachModel.cs +++ b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSeachModel.cs @@ -1,4 +1,3 @@ -using System; using System.Linq; namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi @@ -9,10 +8,6 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi /********* ** Accessors *********/ - /// The namespaced mod keys to search. - [Obsolete] - public string[] ModKeys { get; set; } - /// The mods for which to find data. public ModSearchEntryModel[] Mods { get; set; } -- cgit