using System.Threading.Tasks;
using StardewModdingAPI.Toolkit.Framework.UpdateData;
namespace StardewModdingAPI.Web.Framework.Clients.Nexus
{
/// A client for the Nexus website which does nothing, used for local development.
internal class DisabledNexusClient : INexusClient
{
/*********
** Accessors
*********/
///
public ModSiteKey SiteKey => ModSiteKey.Nexus;
/*********
** Public methods
*********/
/// Get update check info about a mod.
/// The mod ID.
public Task GetModData(string id)
{
return Task.FromResult(
new GenericModPage(ModSiteKey.Nexus, id).SetError(RemoteModStatus.TemporaryError, "The Nexus client is currently disabled due to the configuration.")
);
}
///
public void Dispose() { }
}
}