diff options
author | James Stine <leon.blade@gmail.com> | 2017-08-13 17:44:00 -0400 |
---|---|---|
committer | James Stine <leon.blade@gmail.com> | 2017-08-13 17:44:00 -0400 |
commit | 06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49 (patch) | |
tree | fea1bb6a927ca84009657430134cea8a2028cc09 /Dewdrop/Models/NexusResponseModel.cs | |
download | SMAPI-06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49.tar.gz SMAPI-06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49.tar.bz2 SMAPI-06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49.zip |
First commit.
Diffstat (limited to 'Dewdrop/Models/NexusResponseModel.cs')
-rw-r--r-- | Dewdrop/Models/NexusResponseModel.cs | 48 |
1 files changed, 48 insertions, 0 deletions
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 + { + /// <summary> + /// The name of the mod. + /// </summary> + [JsonProperty("name")] + public string Name { get; set; } + + /// <summary> + /// The version of the mod. + /// </summary> + [JsonProperty("version")] + public string Version { get; set; } + + /// <summary> + /// The NexusMod ID for the mod. + /// </summary> + [JsonProperty("id")] + public int Id { get; set; } + + /// <summary> + /// The URL of the mod. + /// </summary> + [JsonProperty("mod_page_uri")] + public string Url { get; set; } + + /// <summary> + /// Return mod information about a Nexus mod + /// </summary> + /// <returns><see cref="ModGenericModel"/></returns> + public ModGenericModel ModInfo() + { + return new ModGenericModel + { + Id = Id, + Version = Version, + Name = Name, + Url = Url, + Vendor = "Nexus" + }; + } + } +} |