Added list of shockerIds to abstract class Shocker
This commit is contained in:
parent
ae278b402e
commit
4b90db389d
@ -2,13 +2,20 @@
|
|||||||
|
|
||||||
public abstract class Shocker
|
public abstract class Shocker
|
||||||
{
|
{
|
||||||
public string ApiKey, Endpoint;
|
protected readonly HttpClient HttpClient;
|
||||||
public enum ControlAction { Beep, Vibrate, Shock }
|
protected readonly string ApiKey;
|
||||||
public abstract void Control(ControlAction action, byte intensity, short duration);
|
protected readonly string Endpoint;
|
||||||
|
protected string[] ShockerIds;
|
||||||
|
|
||||||
public Shocker(string endpoint, string apiKey)
|
public enum ControlAction { Beep, Vibrate, Shock }
|
||||||
|
|
||||||
|
public abstract void Control(ControlAction action, byte intensity, short duration, string? shockerId = null);
|
||||||
|
|
||||||
|
protected Shocker(string endpoint, string apiKey, string[] shockerIds)
|
||||||
{
|
{
|
||||||
this.Endpoint = endpoint;
|
this.Endpoint = endpoint;
|
||||||
this.ApiKey = apiKey;
|
this.ApiKey = apiKey;
|
||||||
|
this.HttpClient = new HttpClient();
|
||||||
|
this.ShockerIds = shockerIds;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user