blob: 6edd5f647fbe9ddb710db9239eb3ca740381d467 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
using System.Threading.Tasks;
using StardewModdingAPI.Toolkit.Framework.UpdateData;
namespace StardewModdingAPI.Web.Framework.Clients.Nexus
{
/// <summary>A client for the Nexus website which does nothing, used for local development.</summary>
internal class DisabledNexusClient : INexusClient
{
/*********
** Accessors
*********/
/// <inheritdoc />
public ModSiteKey SiteKey => ModSiteKey.Nexus;
/*********
** Public methods
*********/
/// <summary>Get update check info about a mod.</summary>
/// <param name="id">The mod ID.</param>
public Task<IModPage?> GetModData(string id)
{
return Task.FromResult<IModPage?>(
new GenericModPage(ModSiteKey.Nexus, id).SetError(RemoteModStatus.TemporaryError, "The Nexus client is currently disabled due to the configuration.")
);
}
/// <inheritdoc />
public void Dispose() { }
}
}
|