Removed Example Console Project

Removed Old Api Classes
Added new Http Api Service and Classes
TODO Dynamic Effect Methods
This commit is contained in:
Markus Bender
2024-02-26 04:47:47 +01:00
parent 8cb2a51cd3
commit 368de74820
23 changed files with 388 additions and 200 deletions

View File

@ -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
{
/// <summary>
/// Sets the required Api Key for the Govee Api.
/// Request Api Key in the Mobile Phone App.
/// </summary>
/// <param name="apiKey">Api Key as String</param>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
void SetApiKey(string apiKey);
/// <summary>
/// Returns current set Govee Api Key
/// </summary>
/// <returns>Govee Api Key as String</returns>
string GetApiKey();
/// <summary>
/// Removes the Set Api Key and resets the HTTP Header
/// </summary>
void RemoveApiKey();
/// <summary>
/// Requests all Devices registered to Api Key Govee Account
/// </summary>
/// <returns>List of GoveeApiDevices</returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task<List<GoveeApiDevice>> GetDevices();
/// <returns>List of GoveeHttpDevices</returns>
Task<ServiceResponse<List<GoveeHttpDevice>>> GetDevices();
/// <summary>
/// Requests the State of a single Govee Device
/// </summary>
/// <param name="deviceId">Device Id Guid as string</param>
/// <param name="deviceModel">Device Model Number as string</param>
/// <returns>GoveeApiStat Object</returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task<GoveeApiState> GetDeviceState(string deviceId, string deviceModel);
/// <returns>GoveeHttpState Object</returns>
Task<ServiceResponse<GoveeHttpState>> GetDeviceState(string deviceId, string deviceModel);
/// <summary>
/// Sets the On/Off state of a single Govee Device
/// </summary>
@ -50,21 +39,7 @@ public interface IGoveeApiService
/// <param name="deviceModel">Device Model Number as string</param>
/// <param name="on"></param>
/// <returns></returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task ToggleState(string deviceId, string deviceModel, bool on);
/// <summary>
/// Sets the Brightness in Percent of a single Govee Device
/// </summary>
/// <param name="deviceId">Device Id Guid as string</param>
/// <param name="deviceModel">Device Model Number as string</param>
/// <param name="value">Brightness in Percent as Int</param>
/// <returns></returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task SetBrightness(string deviceId, string deviceModel, int value);
Task<ServiceResponse<bool>> SetOnOff(string deviceId, string deviceModel, bool on);
/// <summary>
/// Sets a Rgb Color of a single Govee Device
/// </summary>
@ -72,10 +47,7 @@ public interface IGoveeApiService
/// <param name="deviceModel">Device Model Number as string</param>
/// <param name="color">Rgb Color</param>
/// <returns></returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task SetColor(string deviceId, string deviceModel, RgbColor color);
Task<ServiceResponse<bool>> SetColor(string deviceId, string deviceModel, RgbColor color);
/// <summary>
/// Sets the Color Temperature of a single Govee Device
/// </summary>
@ -83,7 +55,14 @@ public interface IGoveeApiService
/// <param name="deviceModel">Device Model Number as string</param>
/// <param name="value">Color Temp in Kelvin as Int</param>
/// <returns></returns>
[Obsolete("New Api Reference: https://developer.govee.com/reference/" ,true)]
Task<ServiceResponse<bool>> SetColorTemp(string deviceId, string deviceModel, int value);
/// <summary>
/// Sets the Brightness of a single Govee Device
/// </summary>
/// <param name="deviceId">Device Id Guid as string</param>
/// <param name="deviceModel">Device Model Number as string</param>
/// <param name="value">Value 1-100</param>
/// <returns></returns>
Task<ServiceResponse<bool>> SetBrightness(string deviceId, string deviceModel, int value);
Task SetColorTemp(string deviceId, string deviceModel, int value);
}