summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients/CurseForge/ResponseModels/ModModel.cs
blob: fd7796f2ebb4d2feaa0b4c00aa7c0fed698de652 (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
33
34
35
36
37
38
namespace StardewModdingAPI.Web.Framework.Clients.CurseForge.ResponseModels
{
    /// <summary>An mod from the CurseForge API.</summary>
    public class ModModel
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The mod's unique ID on CurseForge.</summary>
        public int ID { get; }

        /// <summary>The mod name.</summary>
        public string Name { get; }

        /// <summary>The web URL for the mod page.</summary>
        public string WebsiteUrl { get; }

        /// <summary>The available file downloads.</summary>
        public ModFileModel[] LatestFiles { get; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="id">The mod's unique ID on CurseForge.</param>
        /// <param name="name">The mod name.</param>
        /// <param name="websiteUrl">The web URL for the mod page.</param>
        /// <param name="latestFiles">The available file downloads.</param>
        public ModModel(int id, string name, string websiteUrl, ModFileModel[] latestFiles)
        {
            this.ID = id;
            this.Name = name;
            this.WebsiteUrl = websiteUrl;
            this.LatestFiles = latestFiles;
        }
    }
}