|
| 1 | +using System.Collections.Generic; |
| 2 | +using System.Diagnostics.CodeAnalysis; |
| 3 | +using Newtonsoft.Json; |
| 4 | + |
| 5 | +namespace StardewModdingAPI.Toolkit.Framework.Clients.NexusExport.ResponseModels |
| 6 | +{ |
| 7 | + /// <summary>The metadata for a mod from the Nexus Mods export API.</summary> |
| 8 | + public class NexusModExport |
| 9 | + { |
| 10 | + /// <summary>The unique internal mod identifier (not the public mod ID).</summary> |
| 11 | + public long Uid { get; set; } |
| 12 | + |
| 13 | + /// <summary>The mod's display name.</summary> |
| 14 | + public string? Name { get; set; } |
| 15 | + |
| 16 | + /// <summary>The author display name set for the mod.</summary> |
| 17 | + public string? Author { get; set; } |
| 18 | + |
| 19 | + /// <summary>The username for the user who uploaded the mod.</summary> |
| 20 | + public string? Uploader { get; set; } |
| 21 | + |
| 22 | + /// <summary>The ID for the user who uploaded the mod.</summary> |
| 23 | + [JsonProperty("uploader_id")] |
| 24 | + public int UploaderId { get; set; } |
| 25 | + |
| 26 | + /// <summary>The mod's semantic version.</summary> |
| 27 | + public string? Version { get; set; } |
| 28 | + |
| 29 | + /// <summary>The category ID.</summary> |
| 30 | + [JsonProperty("category_id")] |
| 31 | + public int CategoryId { get; set; } |
| 32 | + |
| 33 | + /// <summary>Whether the mod is published by the author.</summary> |
| 34 | + public bool Published { get; set; } |
| 35 | + |
| 36 | + /// <summary>Whether the mod is hidden by moderators.</summary> |
| 37 | + public bool Moderated { get; set; } |
| 38 | + |
| 39 | + /// <summary>Whether the mod page is visible to users.</summary> |
| 40 | + [JsonProperty("allow_view")] |
| 41 | + public bool AllowView { get; set; } |
| 42 | + |
| 43 | + /// <summary>Whether the mod is marked as containing adult content.</summary> |
| 44 | + public bool Adult { get; set; } |
| 45 | + |
| 46 | + /// <summary>The files uploaded for the mod.</summary> |
| 47 | + public Dictionary<uint, NexusFileExport> Files { get; set; } = new(); |
| 48 | + |
| 49 | + /// <summary>The extra fields returned by the export API, if any.</summary> |
| 50 | + [JsonExtensionData] |
| 51 | + [SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "Used to track any new data provided by the API.")] |
| 52 | + public Dictionary<string, object>? OtherFields; |
| 53 | + } |
| 54 | +} |
0 commit comments