feat: use Client interface instead of client struct when interacting with UniFi SDK (#21)

* feat: use Client interface instead of client struct when interacting with UniFi SDK

Breaking change!

* chore: linting

* chore: linting
This commit is contained in:
Mateusz Filipowicz
2025-02-17 09:38:41 +01:00
committed by GitHub
parent fadc5ada8b
commit dca894e8e7
104 changed files with 1048 additions and 419 deletions

View File

@@ -51,7 +51,7 @@ func (dst *SettingBroadcast) UnmarshalJSON(b []byte) error {
return nil
}
func (c *Client) getSettingBroadcast(ctx context.Context, site string) (*SettingBroadcast, error) {
func (c *client) getSettingBroadcast(ctx context.Context, site string) (*SettingBroadcast, error) {
var respBody struct {
Meta Meta `json:"meta"`
Data []SettingBroadcast `json:"data"`
@@ -70,7 +70,7 @@ func (c *Client) getSettingBroadcast(ctx context.Context, site string) (*Setting
return &d, nil
}
func (c *Client) updateSettingBroadcast(ctx context.Context, site string, d *SettingBroadcast) (*SettingBroadcast, error) {
func (c *client) updateSettingBroadcast(ctx context.Context, site string, d *SettingBroadcast) (*SettingBroadcast, error) {
var respBody struct {
Meta Meta `json:"meta"`
Data []SettingBroadcast `json:"data"`