diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-23 21:55:11 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-23 21:55:11 -0400 |
commit | 786077340f2cea37d82455fc413535ae82a912ee (patch) | |
tree | 588d6755b1001bd7eb218dcf9b332feb933e180b /src/SMAPI.Web/Framework/Clients/Nexus/ResponseModels | |
parent | d7add894419543667e60569bfeb439e8e797a4d1 (diff) | |
download | SMAPI-786077340f2cea37d82455fc413535ae82a912ee.tar.gz SMAPI-786077340f2cea37d82455fc413535ae82a912ee.tar.bz2 SMAPI-786077340f2cea37d82455fc413535ae82a912ee.zip |
refactor update check API
This simplifies the logic for individual clients, centralises common logic, and prepares for upcoming features.
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients/Nexus/ResponseModels')
-rw-r--r-- | src/SMAPI.Web/Framework/Clients/Nexus/ResponseModels/NexusMod.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/Nexus/ResponseModels/NexusMod.cs b/src/SMAPI.Web/Framework/Clients/Nexus/ResponseModels/NexusMod.cs new file mode 100644 index 00000000..aef90ede --- /dev/null +++ b/src/SMAPI.Web/Framework/Clients/Nexus/ResponseModels/NexusMod.cs @@ -0,0 +1,33 @@ +using Newtonsoft.Json; + +namespace StardewModdingAPI.Web.Framework.Clients.Nexus.ResponseModels +{ + /// <summary>Mod metadata from Nexus Mods.</summary> + internal class NexusMod + { + /********* + ** Accessors + *********/ + /// <summary>The mod name.</summary> + public string Name { get; set; } + + /// <summary>The mod's semantic version number.</summary> + public string Version { get; set; } + + /// <summary>The mod's web URL.</summary> + [JsonProperty("mod_page_uri")] + public string Url { get; set; } + + /// <summary>The mod's publication status.</summary> + [JsonIgnore] + public NexusModStatus Status { get; set; } = NexusModStatus.Ok; + + /// <summary>The files available to download.</summary> + [JsonIgnore] + public IModDownload[] Downloads { get; set; } + + /// <summary>A custom user-friendly error which indicates why fetching the mod info failed (if applicable).</summary> + [JsonIgnore] + public string Error { get; set; } + } +} |