summaryrefslogtreecommitdiff
path: root/src/SMAPI.Common/Models
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-03-15 19:52:18 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-03-15 19:52:18 -0400
commit436c071ba4ecbe43769b438277d441057d05403e (patch)
tree951a55434858a6a6417f04f6993843ef5769f3dc /src/SMAPI.Common/Models
parent9e052ae91671024c9c6b74754ec9d184a57a5278 (diff)
downloadSMAPI-436c071ba4ecbe43769b438277d441057d05403e.tar.gz
SMAPI-436c071ba4ecbe43769b438277d441057d05403e.tar.bz2
SMAPI-436c071ba4ecbe43769b438277d441057d05403e.zip
add support for preview GitHub releases (#457)
Diffstat (limited to 'src/SMAPI.Common/Models')
-rw-r--r--src/SMAPI.Common/Models/ModInfoModel.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/SMAPI.Common/Models/ModInfoModel.cs b/src/SMAPI.Common/Models/ModInfoModel.cs
index 48305cb8..48df235a 100644
--- a/src/SMAPI.Common/Models/ModInfoModel.cs
+++ b/src/SMAPI.Common/Models/ModInfoModel.cs
@@ -9,9 +9,12 @@ namespace StardewModdingAPI.Common.Models
/// <summary>The mod name.</summary>
public string Name { get; set; }
- /// <summary>The mod's semantic version number.</summary>
+ /// <summary>The semantic version for the mod's latest release.</summary>
public string Version { get; set; }
+ /// <summary>The semantic version for the mod's latest preview release, if available and different from <see cref="Version"/>.</summary>
+ public string PreviewVersion { get; set; }
+
/// <summary>The mod's web URL.</summary>
public string Url { get; set; }
@@ -28,16 +31,17 @@ namespace StardewModdingAPI.Common.Models
// needed for JSON deserialising
}
-
/// <summary>Construct an instance.</summary>
/// <param name="name">The mod name.</param>
- /// <param name="version">The mod's semantic version number.</param>
+ /// <param name="version">The semantic version for the mod's latest release.</param>
+ /// <param name="previewVersion">The semantic version for the mod's latest preview release, if available and different from <see cref="Version"/>.</param>
/// <param name="url">The mod's web URL.</param>
/// <param name="error">The error message indicating why the mod is invalid (if applicable).</param>
- public ModInfoModel(string name, string version, string url, string error = null)
+ public ModInfoModel(string name, string version, string url, string previewVersion = null, string error = null)
{
this.Name = name;
this.Version = version;
+ this.PreviewVersion = previewVersion;
this.Url = url;
this.Error = error; // mainly initialised here for the JSON deserialiser
}