summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-06-19 22:10:15 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-06-19 22:10:15 -0400
commitd401aff3307f6e2e1641610fdd912b572d6b04c1 (patch)
tree361db0c08914b34a58ac985aeacd108c8b932ae0 /src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs
parent4a05cd09b66a9ec37522aa656ab0814095ab6d23 (diff)
downloadSMAPI-d401aff3307f6e2e1641610fdd912b572d6b04c1.tar.gz
SMAPI-d401aff3307f6e2e1641610fdd912b572d6b04c1.tar.bz2
SMAPI-d401aff3307f6e2e1641610fdd912b572d6b04c1.zip
rewrite update checks (#551)
Diffstat (limited to 'src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs')
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs
new file mode 100644
index 00000000..bca47647
--- /dev/null
+++ b/src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs
@@ -0,0 +1,34 @@
+namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi
+{
+ /// <summary>Specifies the identifiers for a mod to match.</summary>
+ public class ModSearchEntryModel
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The unique mod ID.</summary>
+ public string ID { get; set; }
+
+ /// <summary>The namespaced mod update keys (if available).</summary>
+ public string[] UpdateKeys { get; set; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an empty instance.</summary>
+ public ModSearchEntryModel()
+ {
+ // needed for JSON deserialising
+ }
+
+ /// <summary>Construct an instance.</summary>
+ /// <param name="id">The unique mod ID.</param>
+ /// <param name="updateKeys">The namespaced mod update keys (if available).</param>
+ public ModSearchEntryModel(string id, string[] updateKeys)
+ {
+ this.ID = id;
+ this.UpdateKeys = updateKeys ?? new string[0];
+ }
+ }
+}