From 06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49 Mon Sep 17 00:00:00 2001 From: James Stine Date: Sun, 13 Aug 2017 17:44:00 -0400 Subject: First commit. --- Dewdrop/Models/NexusResponseModel.cs | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Dewdrop/Models/NexusResponseModel.cs (limited to 'Dewdrop/Models/NexusResponseModel.cs') diff --git a/Dewdrop/Models/NexusResponseModel.cs b/Dewdrop/Models/NexusResponseModel.cs new file mode 100644 index 00000000..e954a8bc --- /dev/null +++ b/Dewdrop/Models/NexusResponseModel.cs @@ -0,0 +1,48 @@ +using System; +using Newtonsoft.Json; + +namespace Dewdrop.Models +{ + public class NexusResponseModel : IModModel + { + /// + /// The name of the mod. + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// The version of the mod. + /// + [JsonProperty("version")] + public string Version { get; set; } + + /// + /// The NexusMod ID for the mod. + /// + [JsonProperty("id")] + public int Id { get; set; } + + /// + /// The URL of the mod. + /// + [JsonProperty("mod_page_uri")] + public string Url { get; set; } + + /// + /// Return mod information about a Nexus mod + /// + /// + public ModGenericModel ModInfo() + { + return new ModGenericModel + { + Id = Id, + Version = Version, + Name = Name, + Url = Url, + Vendor = "Nexus" + }; + } + } +} -- cgit