using StardewModdingAPI.Toolkit.Framework.Clients.Wiki; namespace StardewModdingAPI.Web.ViewModels { /// Metadata about a mod's compatibility with the latest versions of SMAPI and Stardew Valley. public class ModCompatibilityModel { /********* ** Accessors *********/ /// The compatibility status, as a string like "Broken". public string Status { get; set; } /// A link to the unofficial version which fixes compatibility, if any. public ModLinkModel UnofficialVersion { get; set; } /// The human-readable summary, as an HTML block. public string Summary { get; set; } /********* ** Public methods *********/ /// Construct an instance. /// The mod metadata. public ModCompatibilityModel(WikiCompatibilityInfo info) { this.Status = info.Status.ToString(); if (info.UnofficialVersion != null) this.UnofficialVersion = new ModLinkModel(info.UnofficialUrl, info.UnofficialVersion.ToString()); this.Summary = info.Summary; } } }