Add ValidateSession method to check vehicle status and log errors
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 27s

This commit is contained in:
2025-07-05 16:14:10 -04:00
parent cff0624807
commit b61b5664b7

View File

@ -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 {