diff --git a/CShocker/CShocker.csproj b/CShocker/CShocker.csproj
index f19cafa..15e112e 100644
--- a/CShocker/CShocker.csproj
+++ b/CShocker/CShocker.csproj
@@ -7,7 +7,7 @@
Glax
https://github.com/C9Glax/CShocker
git
- 1.2.1
+ 1.2.2
diff --git a/CShocker/Shockers/ShockerJsonConverter.cs b/CShocker/Shockers/ShockerJsonConverter.cs
index 663a6a2..0ee9554 100644
--- a/CShocker/Shockers/ShockerJsonConverter.cs
+++ b/CShocker/Shockers/ShockerJsonConverter.cs
@@ -25,11 +25,20 @@ public class ShockerJsonConverter : JsonConverter
jo.SelectToken("ShockerIds")!.ToObject>()!,
jo.SelectToken("IntensityRange")!.ToObject()!,
jo.SelectToken("DurationRange")!.ToObject()!,
- jo.SelectToken("Endpoint")!.Value()!,
- jo.SelectToken("ApiKey")!.Value()!
+ jo.SelectToken("ApiKey")!.Value()!,
+ jo.SelectToken("Endpoint")!.Value()!
);
case ShockerApi.OpenShockSerial:
case ShockerApi.PiShockHttp:
+ return new PiShockHttp(
+ jo.SelectToken("ShockerIds")!.ToObject>()!,
+ jo.SelectToken("IntensityRange")!.ToObject()!,
+ jo.SelectToken("DurationRange")!.ToObject()!,
+ jo.SelectToken("ApiKey")!.Value()!,
+ jo.SelectToken("Username")!.Value()!,
+ jo.SelectToken("ShareCode")!.Value()!,
+ jo.SelectToken("Endpoint")!.Value()!
+ );
case ShockerApi.PiShockSerial:
throw new NotImplementedException();
default: