diff options
Diffstat (limited to 'src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs')
-rw-r--r-- | src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModSearchEntryModel.cs | 34 |
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]; + } + } +} |