Update DefaultEndpoint
Update ControlActionEnum.cs
This commit is contained in:
2024-11-03 01:11:33 +01:00
parent 7693aa8b09
commit ce0a287e4e
6 changed files with 10 additions and 23 deletions

View File

@ -20,11 +20,6 @@ public abstract class Api : IDisposable
internal void Control(ControlAction action, int intensity, int duration, params Shocker[] shockers)
{
bool enqueueItem = true;
if (action is ControlAction.Nothing)
{
this.Logger?.Log(LogLevel.Information, "No action defined.");
enqueueItem = false;
}
if (!ValidIntensityRange.IsValueWithinLimits(intensity))
{
this.Logger?.Log(LogLevel.Information, $"Value not within allowed {nameof(intensity)}-Range ({ValidIntensityRange.RangeString()}): {intensity}");

View File

@ -11,7 +11,7 @@ public abstract class OpenShockApi : Api
// ReSharper disable twice MemberCanBeProtected.Global -> Exposed
public string Endpoint { get; init; }
public string ApiKey { get; init; }
private const string DefaultEndpoint = "https://api.shocklink.net";
private const string DefaultEndpoint = "https://api.openshock.app";
// ReSharper disable once PublicConstructorInAbstractClass -> Exposed
public OpenShockApi(DeviceApi apiType, string apiKey, string endpoint = DefaultEndpoint, ILogger? logger = null) : base(apiType, new IntegerRange(0, 100), new IntegerRange(300, 30000), logger)