Marking "old" Api as Obsoloete

This commit is contained in:
Locxion
2024-02-11 05:08:29 +01:00
parent d2cd0f0fe0
commit 8cb2a51cd3
3 changed files with 17 additions and 5 deletions

View File

@ -13,12 +13,8 @@
<RepositoryUrl>https://github.com/Locxion/GoveeCSharpConnector</RepositoryUrl> <RepositoryUrl>https://github.com/Locxion/GoveeCSharpConnector</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Locxion/GoveeCSharpConnector/blob/main/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://github.com/Locxion/GoveeCSharpConnector/blob/main/LICENSE</PackageLicenseUrl>
<Version>1.1.2</Version> <Version>1.1.2</Version>
<PackageReadmeFile>README.md</PackageReadmeFile> <PackageReadmeFile>../README.md</PackageReadmeFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<!-- Add a README.md next to the csproj -->
<None Include="README.md" Pack="true" PackagePath=""/>
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" /> <PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="System.Reactive" Version="6.0.0" /> <PackageReference Include="System.Reactive" Version="6.0.0" />

View File

@ -1,6 +1,7 @@
using GoveeCSharpConnector.Objects; using GoveeCSharpConnector.Objects;
namespace GoveeCSharpConnector.Interfaces; namespace GoveeCSharpConnector.Interfaces;
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
public interface IGoveeApiService public interface IGoveeApiService
{ {
@ -9,6 +10,8 @@ public interface IGoveeApiService
/// Request Api Key in the Mobile Phone App. /// Request Api Key in the Mobile Phone App.
/// </summary> /// </summary>
/// <param name="apiKey">Api Key as String</param> /// <param name="apiKey">Api Key as String</param>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
void SetApiKey(string apiKey); void SetApiKey(string apiKey);
/// <summary> /// <summary>
@ -26,6 +29,8 @@ public interface IGoveeApiService
/// Requests all Devices registered to Api Key Govee Account /// Requests all Devices registered to Api Key Govee Account
/// </summary> /// </summary>
/// <returns>List of GoveeApiDevices</returns> /// <returns>List of GoveeApiDevices</returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task<List<GoveeApiDevice>> GetDevices(); Task<List<GoveeApiDevice>> GetDevices();
/// <summary> /// <summary>
@ -34,6 +39,8 @@ public interface IGoveeApiService
/// <param name="deviceId">Device Id Guid as string</param> /// <param name="deviceId">Device Id Guid as string</param>
/// <param name="deviceModel">Device Model Number as string</param> /// <param name="deviceModel">Device Model Number as string</param>
/// <returns>GoveeApiStat Object</returns> /// <returns>GoveeApiStat Object</returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task<GoveeApiState> GetDeviceState(string deviceId, string deviceModel); Task<GoveeApiState> GetDeviceState(string deviceId, string deviceModel);
/// <summary> /// <summary>
@ -43,6 +50,8 @@ public interface IGoveeApiService
/// <param name="deviceModel">Device Model Number as string</param> /// <param name="deviceModel">Device Model Number as string</param>
/// <param name="on"></param> /// <param name="on"></param>
/// <returns></returns> /// <returns></returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task ToggleState(string deviceId, string deviceModel, bool on); Task ToggleState(string deviceId, string deviceModel, bool on);
/// <summary> /// <summary>
@ -52,6 +61,8 @@ public interface IGoveeApiService
/// <param name="deviceModel">Device Model Number as string</param> /// <param name="deviceModel">Device Model Number as string</param>
/// <param name="value">Brightness in Percent as Int</param> /// <param name="value">Brightness in Percent as Int</param>
/// <returns></returns> /// <returns></returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task SetBrightness(string deviceId, string deviceModel, int value); Task SetBrightness(string deviceId, string deviceModel, int value);
/// <summary> /// <summary>
@ -61,6 +72,8 @@ public interface IGoveeApiService
/// <param name="deviceModel">Device Model Number as string</param> /// <param name="deviceModel">Device Model Number as string</param>
/// <param name="color">Rgb Color</param> /// <param name="color">Rgb Color</param>
/// <returns></returns> /// <returns></returns>
[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);
/// <summary> /// <summary>
@ -70,5 +83,7 @@ public interface IGoveeApiService
/// <param name="deviceModel">Device Model Number as string</param> /// <param name="deviceModel">Device Model Number as string</param>
/// <param name="value">Color Temp in Kelvin as Int</param> /// <param name="value">Color Temp in Kelvin as Int</param>
/// <returns></returns> /// <returns></returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task SetColorTemp(string deviceId, string deviceModel, int value); Task SetColorTemp(string deviceId, string deviceModel, int value);
} }

View File

@ -6,6 +6,7 @@ using GoveeCSharpConnector.Objects;
namespace GoveeCSharpConnector.Services; namespace GoveeCSharpConnector.Services;
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
public class GoveeApiService : IGoveeApiService public class GoveeApiService : IGoveeApiService
{ {
private string _apiKey = string.Empty; private string _apiKey = string.Empty;