From 9ec0ec5309a3aef1132d0cf595c83a2ba5935c34 Mon Sep 17 00:00:00 2001 From: Alex Savin Date: Wed, 28 May 2025 12:54:05 -0400 Subject: [PATCH] Some output cleanups --- client.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/client.go b/client.go index 6a8dae8..2547562 100644 --- a/client.go +++ b/client.go @@ -467,7 +467,7 @@ func (c *Client) GetVehicleStatus() { } } -// GetVehicleStatus . +// GetClimateSettings . func (c *Client) GetClimateSettings() { // { // "success": true, @@ -559,16 +559,13 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str if err != nil { c.logger.Error("error while getting body", "error", err.Error()) } - fmt.Printf("RESP BODY: %s\n", string(resBytes)) - // if err != nil { - // fmt.Println(err) - // return - // } + respParsed, err := gabs.ParseJSON(resBytes) if err != nil { c.logger.Error("error which parsing json", "request", "execute", "method", method, "url", requestUrl, "error", err.Error()) } - c.logger.Debug("HTTP OUTPUT", "body", string(resBytes)) + + // c.logger.Debug("HTTP OUTPUT", "body", string(resBytes)) _, ok := respParsed.Path("success").Data().(bool) // value == string, ok == false @@ -623,7 +620,6 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str time.Sleep(3 * time.Second) } } - // fmt.Printf("[DEBUG] HTTP OUTPUT >> %v\n", string([]byte(resp.Body()))) return resBytes }