diff options
Diffstat (limited to 'src/StardewModdingAPI.Web/Models/NexusResponseModel.cs')
-rw-r--r-- | src/StardewModdingAPI.Web/Models/NexusResponseModel.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/StardewModdingAPI.Web/Models/NexusResponseModel.cs b/src/StardewModdingAPI.Web/Models/NexusResponseModel.cs new file mode 100644 index 00000000..ae5c691c --- /dev/null +++ b/src/StardewModdingAPI.Web/Models/NexusResponseModel.cs @@ -0,0 +1,41 @@ +using Newtonsoft.Json; + +namespace StardewModdingAPI.Web.Models +{ + /// <summary>A mod metadata response from Nexus Mods.</summary> + public class NexusResponseModel : IModModel + { + /********* + ** Accessors + *********/ + /// <summary>The unique mod ID.</summary> + public int ID { get; set; } + + /// <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; } + + + /********* + ** Public methods + *********/ + /// <summary>Get basic mod metadata.</summary> + public ModGenericModel ModInfo() + { + return new ModGenericModel + { + ID = this.ID, + Version = this.Version, + Name = this.Name, + Url = this.Url, + Vendor = "Nexus" + }; + } + } +} |