From b61b5664b70c2da2fa8b42b360afa0dc0148e993 Mon Sep 17 00:00:00 2001 From: Alex Savin Date: Sat, 5 Jul 2025 16:14:10 -0400 Subject: [PATCH] Add ValidateSession method to check vehicle status and log errors --- client.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/client.go b/client.go index 5f82834..6a22e41 100644 --- a/client.go +++ b/client.go @@ -311,6 +311,19 @@ func (c *Client) parseResponse(b []byte) (Response, bool) { return r, true } +// ValidateSession . +func (c *Client) ValidateSession() bool { + reqURL := MOBILE_API_VERSION + apiURLs["API_VEHICLE_STATUS"] + resp, err := c.execute(GET, reqURL, map[string]string{}, false) + if err != nil { + c.logger.Error("error while executing validateSession request", "request", "validateSession", "error", err.Error()) + return false + } + c.logger.Debug("http request output", "request", "validateSession", "body", resp) + + return true +} + // validateSession . // TODO: add session validation process and add it to the proper functions // func (c *Client) validateSession() bool {