summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/Nexus/NexusMod.cs
blob: 0f1b29d5972304440ddbbcd7d2f0bee941795f61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Newtonsoft.Json;

namespace StardewModdingAPI.Web.Framework.Clients.Nexus
{
    /// <summary>Mod metadata from Nexus Mods.</summary>
    internal class NexusMod
    {
        /*********
        ** Accessors
        *********/
        /// <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 latest file version.</summary>
        public ISemanticVersion LatestFileVersion { get; set; }

        /// <summary>The mod's web URL.</summary>
        [JsonProperty("mod_page_uri")]
        public string Url { get; set; }

        /// <summary>The mod's publication status.</summary>
        [JsonIgnore]
        public NexusModStatus Status { get; set; } = NexusModStatus.Ok;

        /// <summary>A user-friendly error which indicates why fetching the mod info failed (if applicable).</summary>
        [JsonIgnore]
        public string Error { get; set; }
    }
}