rename Nexus API client for upcoming API usage (#651)
This commit is contained in:
parent
08d83aa039
commit
890c6b3ea7
|
@ -10,7 +10,7 @@ using StardewModdingAPI.Toolkit;
|
||||||
namespace StardewModdingAPI.Web.Framework.Clients.Nexus
|
namespace StardewModdingAPI.Web.Framework.Clients.Nexus
|
||||||
{
|
{
|
||||||
/// <summary>An HTTP client for fetching mod metadata from the Nexus website.</summary>
|
/// <summary>An HTTP client for fetching mod metadata from the Nexus website.</summary>
|
||||||
internal class NexusWebScrapeClient : INexusClient
|
internal class NexusClient : INexusClient
|
||||||
{
|
{
|
||||||
/*********
|
/*********
|
||||||
** Fields
|
** Fields
|
||||||
|
@ -33,7 +33,7 @@ namespace StardewModdingAPI.Web.Framework.Clients.Nexus
|
||||||
/// <param name="baseUrl">The base URL for the Nexus Mods site.</param>
|
/// <param name="baseUrl">The base URL for the Nexus Mods site.</param>
|
||||||
/// <param name="modUrlFormat">The URL for a Nexus Mods mod page for the user, excluding the <paramref name="baseUrl"/>, where {0} is the mod ID.</param>
|
/// <param name="modUrlFormat">The URL for a Nexus Mods mod page for the user, excluding the <paramref name="baseUrl"/>, where {0} is the mod ID.</param>
|
||||||
/// <param name="modScrapeUrlFormat">The URL for a Nexus mod page to scrape for versions, excluding the base URL, where {0} is the mod ID.</param>
|
/// <param name="modScrapeUrlFormat">The URL for a Nexus mod page to scrape for versions, excluding the base URL, where {0} is the mod ID.</param>
|
||||||
public NexusWebScrapeClient(string userAgent, string baseUrl, string modUrlFormat, string modScrapeUrlFormat)
|
public NexusClient(string userAgent, string baseUrl, string modUrlFormat, string modScrapeUrlFormat)
|
||||||
{
|
{
|
||||||
this.ModUrlFormat = modUrlFormat;
|
this.ModUrlFormat = modUrlFormat;
|
||||||
this.ModScrapeUrlFormat = modScrapeUrlFormat;
|
this.ModScrapeUrlFormat = modScrapeUrlFormat;
|
|
@ -135,7 +135,7 @@ namespace StardewModdingAPI.Web
|
||||||
modUrlFormat: api.ModDropModPageUrl
|
modUrlFormat: api.ModDropModPageUrl
|
||||||
));
|
));
|
||||||
|
|
||||||
services.AddSingleton<INexusClient>(new NexusWebScrapeClient(
|
services.AddSingleton<INexusClient>(new NexusClient(
|
||||||
userAgent: userAgent,
|
userAgent: userAgent,
|
||||||
baseUrl: api.NexusBaseUrl,
|
baseUrl: api.NexusBaseUrl,
|
||||||
modUrlFormat: api.NexusModUrlFormat,
|
modUrlFormat: api.NexusModUrlFormat,
|
||||||
|
|
Loading…
Reference in New Issue