diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-11-08 13:44:49 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-11-08 13:44:49 -0500 |
commit | 0aac0717bf1c46d798ed007d3c7c5c050e07f354 (patch) | |
tree | 7543099b0ad1a0fb932c69718cfd4d06b8729850 /src/SMAPI.Toolkit | |
parent | 8b09a2776d9c0faf96fa90c923952033ce659477 (diff) | |
download | SMAPI-0aac0717bf1c46d798ed007d3c7c5c050e07f354.tar.gz SMAPI-0aac0717bf1c46d798ed007d3c7c5c050e07f354.tar.bz2 SMAPI-0aac0717bf1c46d798ed007d3c7c5c050e07f354.zip |
add CurseForge to mod metadata (#605)
Diffstat (limited to 'src/SMAPI.Toolkit')
3 files changed, 18 insertions, 0 deletions
diff --git a/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs b/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs index bd5f71a9..8074210c 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs @@ -28,6 +28,12 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi /// <summary>The mod ID in the Chucklefish mod repo.</summary> public int? ChucklefishID { get; set; } + /// <summary>The mod ID in the CurseForge mod repo.</summary> + public int? CurseForgeID { get; set; } + + /// <summary>The mod key in the CurseForge mod repo (used in mod page URLs).</summary> + public string CurseForgeKey { get; set; } + /// <summary>The mod ID in the ModDrop mod repo.</summary> public int? ModDropID { get; set; } @@ -87,6 +93,8 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi this.Name = wiki.Name.FirstOrDefault(); this.NexusID = wiki.NexusID; this.ChucklefishID = wiki.ChucklefishID; + this.CurseForgeID = wiki.CurseForgeID; + this.CurseForgeKey = wiki.CurseForgeKey; this.ModDropID = wiki.ModDropID; this.GitHubRepo = wiki.GitHubRepo; this.CustomSourceUrl = wiki.CustomSourceUrl; diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs index ab6a2517..610e14f1 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs @@ -93,6 +93,8 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki string[] warnings = this.GetAttributeAsCsv(node, "data-warnings"); int? nexusID = this.GetAttributeAsNullableInt(node, "data-nexus-id"); int? chucklefishID = this.GetAttributeAsNullableInt(node, "data-cf-id"); + int? curseForgeID = this.GetAttributeAsNullableInt(node, "data-curseforge-id"); + string curseForgeKey = this.GetAttribute(node, "data-curseforge-key"); int? modDropID = this.GetAttributeAsNullableInt(node, "data-moddrop-id"); string githubRepo = this.GetAttribute(node, "data-github"); string customSourceUrl = this.GetAttribute(node, "data-custom-source"); @@ -145,6 +147,8 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki Author = authors, NexusID = nexusID, ChucklefishID = chucklefishID, + CurseForgeID = curseForgeID, + CurseForgeKey = curseForgeKey, ModDropID = modDropID, GitHubRepo = githubRepo, CustomSourceUrl = customSourceUrl, diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs index 06c44308..51bb2336 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs @@ -23,6 +23,12 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki /// <summary>The mod ID in the Chucklefish mod repo.</summary> public int? ChucklefishID { get; set; } + /// <summary>The mod ID in the CurseForge mod repo.</summary> + public int? CurseForgeID { get; set; } + + /// <summary>The mod key in the CurseForge mod repo (used in mod page URLs).</summary> + public string CurseForgeKey { get; set; } + /// <summary>The mod ID in the ModDrop mod repo.</summary> public int? ModDropID { get; set; } |