Format and typos

This commit is contained in:
2025-08-11 18:56:14 -07:00
parent 76ccf20c30
commit 4c6755df31
34 changed files with 1604 additions and 511 deletions

View File

@ -1,7 +1,6 @@
namespace GoveeCSharpConnector.Objects;
public class ApiResponse
{
public string? Message { get; set; }
public class ApiResponse {
public string Message { get; set; }
public int Code { get; set; }
}

View File

@ -1,8 +1,5 @@
using System.Collections.Generic;
namespace GoveeCSharpConnector.Objects;
public class Data
{
public class Data {
public List<GoveeApiDevice> Devices { get; set; }
}

View File

@ -1,14 +1,12 @@
namespace GoveeCSharpConnector.Objects;
public class GoveeApiCommand
{
public class GoveeApiCommand {
public string Device { get; set; }
public string Model { get; set; }
public Command Cmd { get; set; }
}
public class Command
{
public class Command {
public string Name { get; set; }
public object Value { get; set; }
}

View File

@ -1,10 +1,8 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace GoveeCSharpConnector.Objects;
public class GoveeApiDevice
{
public class GoveeApiDevice {
[JsonPropertyName("device")]
public string DeviceId { get; set; }
public string Model { get; set; }

View File

@ -2,15 +2,14 @@ using System.Text.Json.Serialization;
namespace GoveeCSharpConnector.Objects;
public class GoveeApiState
{
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; }
}

View File

@ -1,7 +1,6 @@
namespace GoveeCSharpConnector.Objects;
public class GoveeDevice
{
public class GoveeDevice {
public string DeviceId { get; set; }
public string Model { get; set; }
public string DeviceName { get; set; }

View File

@ -1,6 +1,5 @@
namespace GoveeCSharpConnector.Objects;
public class GoveeResponse : ApiResponse
{
public class GoveeResponse : ApiResponse {
public Data Data { get; set; }
}

View File

@ -2,8 +2,7 @@ using GoveeCSharpConnector.Enums;
namespace GoveeCSharpConnector.Objects;
public class GoveeState
{
public class GoveeState {
public PowerState State { get; set; }
public int Brightness { get; set; }
public RgbColor Color { get; set; }

View File

@ -1,13 +1,12 @@
// ReSharper disable InconsistentNaming
namespace GoveeCSharpConnector.Objects;
public class GoveeUdpDevice
{
public string ip { get; set; }
public string device { get; set; }
public string sku { get; set; }
public string bleVersionHard { get; set; }
public string bleVersionSoft { get; set; }
public string wifiVersionHard { get; set; }
public string wifiVersionSoft { get; set; }
public class GoveeUdpDevice {
public string IP { get; set; }
public string Device { get; set; }
public string Sku { get; set; }
public string BleVersionHard { get; set; }
public string BleVersionSoft { get; set; }
public string WiFiVersionHard { get; set; }
public string WiFiVersionSoft { get; set; }
}

View File

@ -1,12 +1,10 @@
// ReSharper disable InconsistentNaming
namespace GoveeCSharpConnector.Objects;
public class GoveeUdpMessage
{
public msg msg { get; set; }
public class GoveeUdpMessage {
public Msg Msg { get; set; }
}
public class msg
{
public string cmd { get; set; }
public object data { get; set; }
public class Msg {
public string Cmd { get; set; }
public object Data { get; set; }
}

View File

@ -2,10 +2,9 @@ using GoveeCSharpConnector.Enums;
namespace GoveeCSharpConnector.Objects;
public class GoveeUdpState
{
public PowerState onOff { get; set; }
public short brightness { get; set; }
public RgbColor color { get; set; }
public int colorTempInKelvin { get; set; }
public class GoveeUdpState {
public PowerState OnOff { get; set; }
public short Brightness { get; set; }
public RgbColor Color { get; set; }
public int ColorTempInKelvin { get; set; }
}

View File

@ -2,8 +2,7 @@ using GoveeCSharpConnector.Enums;
namespace GoveeCSharpConnector.Objects;
public class Properties
{
public class Properties {
public bool Online { get; set; }
public PowerState PowerState { get; set; }
public int Brightness { get; set; }

View File

@ -1,13 +1,11 @@
namespace GoveeCSharpConnector.Objects;
public class RgbColor
{
public class RgbColor {
public short R { get; set; }
public short G { get; set; }
public short B { get; set; }
public RgbColor(int r, int g, int b)
{
public RgbColor(int r, int g, int b) {
R = Convert.ToInt16(r);
G = Convert.ToInt16(g);
B = Convert.ToInt16(b);