diff --git a/GoveeCSharpConnector.sln b/GoveeCSharpConnector.sln
index a2ab44f..1f1ef23 100644
--- a/GoveeCSharpConnector.sln
+++ b/GoveeCSharpConnector.sln
@@ -2,8 +2,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoveeCSharpConnector", "GoveeCSharpConnector\GoveeCSharpConnector.csproj", "{EDF67B3A-9EBF-4C76-92E2-0AACD6B8081B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoveeCsharpConnector.Example", "GoveeCsharpConnector.Example\GoveeCsharpConnector.Example.csproj", "{E487B84B-F619-430A-A0D3-80D44FE9EE3F}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -14,9 +12,5 @@ Global
{EDF67B3A-9EBF-4C76-92E2-0AACD6B8081B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDF67B3A-9EBF-4C76-92E2-0AACD6B8081B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDF67B3A-9EBF-4C76-92E2-0AACD6B8081B}.Release|Any CPU.Build.0 = Release|Any CPU
- {E487B84B-F619-430A-A0D3-80D44FE9EE3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E487B84B-F619-430A-A0D3-80D44FE9EE3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E487B84B-F619-430A-A0D3-80D44FE9EE3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E487B84B-F619-430A-A0D3-80D44FE9EE3F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
diff --git a/GoveeCSharpConnector.sln.DotSettings b/GoveeCSharpConnector.sln.DotSettings
index da83716..78725b5 100644
--- a/GoveeCSharpConnector.sln.DotSettings
+++ b/GoveeCSharpConnector.sln.DotSettings
@@ -1,2 +1,3 @@
- True
\ No newline at end of file
+ True
+ True
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Interfaces/IGoveeApiService.cs b/GoveeCSharpConnector/Interfaces/IGoveeHttpService.cs
similarity index 59%
rename from GoveeCSharpConnector/Interfaces/IGoveeApiService.cs
rename to GoveeCSharpConnector/Interfaces/IGoveeHttpService.cs
index e2c682c..8f2f108 100644
--- a/GoveeCSharpConnector/Interfaces/IGoveeApiService.cs
+++ b/GoveeCSharpConnector/Interfaces/IGoveeHttpService.cs
@@ -1,48 +1,37 @@
using GoveeCSharpConnector.Objects;
+using GoveeCSharpConnector.Objects.Misc;
namespace GoveeCSharpConnector.Interfaces;
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
-public interface IGoveeApiService
+public interface IGoveeHttpService
{
///
/// Sets the required Api Key for the Govee Api.
/// Request Api Key in the Mobile Phone App.
///
/// Api Key as String
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
-
void SetApiKey(string apiKey);
-
///
/// Returns current set Govee Api Key
///
/// Govee Api Key as String
string GetApiKey();
-
///
/// Removes the Set Api Key and resets the HTTP Header
///
void RemoveApiKey();
-
///
/// Requests all Devices registered to Api Key Govee Account
///
- /// List of GoveeApiDevices
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
-
- Task> GetDevices();
-
+ /// List of GoveeHttpDevices
+ Task>> GetDevices();
///
/// Requests the State of a single Govee Device
///
/// Device Id Guid as string
/// Device Model Number as string
- /// GoveeApiStat Object
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
-
- Task GetDeviceState(string deviceId, string deviceModel);
-
+ /// GoveeHttpState Object
+ Task> GetDeviceState(string deviceId, string deviceModel);
///
/// Sets the On/Off state of a single Govee Device
///
@@ -50,21 +39,7 @@ public interface IGoveeApiService
/// Device Model Number as string
///
///
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
-
- Task ToggleState(string deviceId, string deviceModel, bool on);
-
- ///
- /// Sets the Brightness in Percent of a single Govee Device
- ///
- /// Device Id Guid as string
- /// Device Model Number as string
- /// Brightness in Percent as Int
- ///
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
-
- Task SetBrightness(string deviceId, string deviceModel, int value);
-
+ Task> SetOnOff(string deviceId, string deviceModel, bool on);
///
/// Sets a Rgb Color of a single Govee Device
///
@@ -72,10 +47,7 @@ public interface IGoveeApiService
/// Device Model Number as string
/// Rgb Color
///
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
-
- Task SetColor(string deviceId, string deviceModel, RgbColor color);
-
+ Task> SetColor(string deviceId, string deviceModel, RgbColor color);
///
/// Sets the Color Temperature of a single Govee Device
///
@@ -83,7 +55,14 @@ public interface IGoveeApiService
/// Device Model Number as string
/// Color Temp in Kelvin as Int
///
- [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
+ Task> SetColorTemp(string deviceId, string deviceModel, int value);
+ ///
+ /// Sets the Brightness of a single Govee Device
+ ///
+ /// Device Id Guid as string
+ /// Device Model Number as string
+ /// Value 1-100
+ ///
+ Task> SetBrightness(string deviceId, string deviceModel, int value);
- Task SetColorTemp(string deviceId, string deviceModel, int value);
}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/ApiResponse.cs b/GoveeCSharpConnector/Objects/ApiResponse.cs
deleted file mode 100644
index 5639aab..0000000
--- a/GoveeCSharpConnector/Objects/ApiResponse.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace GoveeCSharpConnector.Objects;
-
-public class ApiResponse
-{
- public string? Message { get; set; }
- public int Code { get; set; }
-}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/Data.cs b/GoveeCSharpConnector/Objects/Data.cs
deleted file mode 100644
index 044a900..0000000
--- a/GoveeCSharpConnector/Objects/Data.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using System.Collections.Generic;
-
-namespace GoveeCSharpConnector.Objects;
-
-public class Data
-{
- public List Devices { get; set; }
-}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/GoveeApiCommand.cs b/GoveeCSharpConnector/Objects/GoveeApiCommand.cs
deleted file mode 100644
index d364ccd..0000000
--- a/GoveeCSharpConnector/Objects/GoveeApiCommand.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace GoveeCSharpConnector.Objects;
-
-public class GoveeApiCommand
-{
- public string Device { get; set; }
- public string Model { get; set; }
- public Command Cmd { get; set; }
-}
-
-public class Command
-{
- public string Name { get; set; }
- public object Value { get; set; }
-}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/GoveeApiDevice.cs b/GoveeCSharpConnector/Objects/GoveeApiDevice.cs
deleted file mode 100644
index 19e2c24..0000000
--- a/GoveeCSharpConnector/Objects/GoveeApiDevice.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Collections.Generic;
-using System.Text.Json.Serialization;
-
-namespace GoveeCSharpConnector.Objects;
-
-public class GoveeApiDevice
-{
- [JsonPropertyName("device")]
- public string DeviceId { get; set; }
- public string Model { get; set; }
- public string DeviceName { get; set; }
- public bool Controllable { get; set; }
- public bool Retrievable { get; set; }
- [JsonPropertyName("supportCmds")]
- public List SupportedCommands { get; set; }
- public Properties Properties { get; set; }
-}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/GoveeApiState.cs b/GoveeCSharpConnector/Objects/GoveeApiState.cs
deleted file mode 100644
index 586439e..0000000
--- a/GoveeCSharpConnector/Objects/GoveeApiState.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Text.Json.Serialization;
-
-namespace GoveeCSharpConnector.Objects;
-
-public class GoveeApiState
-{
- [JsonPropertyName("device")]
- public string DeviceId { get; set; }
-
- public string Model { get; set; }
-
- public string Name { get; set; }
-
- [JsonIgnore]
- public Properties Properties { get; set; }
-}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/GoveeHttpDevice.cs b/GoveeCSharpConnector/Objects/GoveeHttpDevice.cs
new file mode 100644
index 0000000..f84e402
--- /dev/null
+++ b/GoveeCSharpConnector/Objects/GoveeHttpDevice.cs
@@ -0,0 +1,14 @@
+using System.Text.Json.Serialization;
+using GoveeCSharpConnector.Objects.Misc;
+
+namespace GoveeCSharpConnector.Objects;
+
+public class GoveeHttpDevice
+{
+ [JsonPropertyName("sku")]
+ public string Model { get; set; }
+ [JsonPropertyName("device")]
+ public string Device { get; set; }
+ [JsonPropertyName("capabilities")]
+ public List Capabilities { get; set; }
+}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/GoveeHttpState.cs b/GoveeCSharpConnector/Objects/GoveeHttpState.cs
new file mode 100644
index 0000000..b388391
--- /dev/null
+++ b/GoveeCSharpConnector/Objects/GoveeHttpState.cs
@@ -0,0 +1,16 @@
+using System.Text.Json.Serialization;
+using GoveeCSharpConnector.Objects.Misc;
+
+namespace GoveeCSharpConnector.Objects;
+
+public class GoveeHttpState
+{
+ [JsonPropertyName("requestId")]
+ public string RequestId { get; set; }
+ [JsonPropertyName("msg")]
+ public string Msg { get; set; }
+ [JsonPropertyName("code")]
+ public long Code { get; set; }
+ [JsonPropertyName("payload")]
+ public Payload Payload { get; set; }
+}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/GoveeResponse.cs b/GoveeCSharpConnector/Objects/GoveeResponse.cs
deleted file mode 100644
index e9ad04f..0000000
--- a/GoveeCSharpConnector/Objects/GoveeResponse.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace GoveeCSharpConnector.Objects;
-
-public class GoveeResponse : ApiResponse
-{
- public Data Data { get; set; }
-}
\ No newline at end of file
diff --git a/GoveeCSharpConnector/Objects/Misc/ApiResponse.cs b/GoveeCSharpConnector/Objects/Misc/ApiResponse.cs
new file mode 100644
index 0000000..f7c4d67
--- /dev/null
+++ b/GoveeCSharpConnector/Objects/Misc/ApiResponse.cs
@@ -0,0 +1,13 @@
+using System.Text.Json.Serialization;
+
+namespace GoveeCSharpConnector.Objects.Misc;
+
+public class ApiResponse
+{
+ [JsonPropertyName("code")]
+ public int Code { get; set; }
+ [JsonPropertyName("message")]
+ public string Message { get; set; }
+ [JsonPropertyName("data")]
+ public List