From 8cb2a51cd331adf667b6fcb6a01463fcc771ce1a Mon Sep 17 00:00:00 2001 From: Locxion Date: Sun, 11 Feb 2024 05:08:29 +0100 Subject: [PATCH] Marking "old" Api as Obsoloete --- GoveeCSharpConnector/GoveeCSharpConnector.csproj | 6 +----- .../Interfaces/IGoveeApiService.cs | 15 +++++++++++++++ GoveeCSharpConnector/Services/GoveeApiService.cs | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/GoveeCSharpConnector/GoveeCSharpConnector.csproj b/GoveeCSharpConnector/GoveeCSharpConnector.csproj index fd63ea2..22f6410 100644 --- a/GoveeCSharpConnector/GoveeCSharpConnector.csproj +++ b/GoveeCSharpConnector/GoveeCSharpConnector.csproj @@ -13,12 +13,8 @@ https://github.com/Locxion/GoveeCSharpConnector https://github.com/Locxion/GoveeCSharpConnector/blob/main/LICENSE 1.1.2 - README.md + ../README.md - - - - diff --git a/GoveeCSharpConnector/Interfaces/IGoveeApiService.cs b/GoveeCSharpConnector/Interfaces/IGoveeApiService.cs index 70ef2c8..e2c682c 100644 --- a/GoveeCSharpConnector/Interfaces/IGoveeApiService.cs +++ b/GoveeCSharpConnector/Interfaces/IGoveeApiService.cs @@ -1,6 +1,7 @@ using GoveeCSharpConnector.Objects; namespace GoveeCSharpConnector.Interfaces; + [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)] public interface IGoveeApiService { @@ -9,6 +10,8 @@ public interface IGoveeApiService /// 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); /// @@ -26,6 +29,8 @@ public interface IGoveeApiService /// Requests all Devices registered to Api Key Govee Account /// /// List of GoveeApiDevices + [Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)] + Task> GetDevices(); /// @@ -34,6 +39,8 @@ public interface IGoveeApiService /// 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); /// @@ -43,6 +50,8 @@ 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); /// @@ -52,6 +61,8 @@ public interface IGoveeApiService /// 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); /// @@ -61,6 +72,8 @@ 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); /// @@ -70,5 +83,7 @@ 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); } \ No newline at end of file diff --git a/GoveeCSharpConnector/Services/GoveeApiService.cs b/GoveeCSharpConnector/Services/GoveeApiService.cs index 76ccafe..5772d0c 100644 --- a/GoveeCSharpConnector/Services/GoveeApiService.cs +++ b/GoveeCSharpConnector/Services/GoveeApiService.cs @@ -6,6 +6,7 @@ using GoveeCSharpConnector.Objects; namespace GoveeCSharpConnector.Services; +[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)] public class GoveeApiService : IGoveeApiService { private string _apiKey = string.Empty;