mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
31 lines
892 B
C#
31 lines
892 B
C#
using Wabbajack.Common;
|
|
|
|
namespace Wabbajack.Lib.NexusApi
|
|
{
|
|
public sealed class NexusApiUtils
|
|
{
|
|
public static string ConvertGameName(string gameName)
|
|
{
|
|
return GameRegistry.GetByMO2ArchiveName(gameName)?.NexusName ?? gameName.ToLower();
|
|
}
|
|
|
|
public static string GetModURL(string argGameName, string argModId)
|
|
{
|
|
return $"https://nexusmods.com/{ConvertGameName(argGameName)}/mods/{argModId}";
|
|
}
|
|
|
|
public static string FixupSummary(string argSummary)
|
|
{
|
|
if (argSummary != null)
|
|
{
|
|
return argSummary.Replace("'", "'")
|
|
.Replace("<br/>", "\n\n")
|
|
.Replace("<br />", "\n\n")
|
|
.Replace("!", "!");
|
|
}
|
|
|
|
return argSummary;
|
|
}
|
|
}
|
|
}
|