More climate presets changes
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 26s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 26s
This commit is contained in:
@ -356,7 +356,7 @@ func (c *Client) GetVehicles() []*Vehicle {
|
|||||||
}
|
}
|
||||||
vehicle.GetVehicleStatus()
|
vehicle.GetVehicleStatus()
|
||||||
vehicle.GetVehicleCondition()
|
vehicle.GetVehicleCondition()
|
||||||
// vehicle.GetClimatePresets()
|
vehicle.GetClimatePresets()
|
||||||
vehicle.GetClimateUserPresets()
|
vehicle.GetClimateUserPresets()
|
||||||
vehicle.GetClimateQuickPresets()
|
vehicle.GetClimateQuickPresets()
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ func (c *Client) GetVehicleByVIN(vin string) *Vehicle {
|
|||||||
|
|
||||||
vehicle.GetVehicleStatus()
|
vehicle.GetVehicleStatus()
|
||||||
vehicle.GetVehicleCondition()
|
vehicle.GetVehicleCondition()
|
||||||
// vehicle.GetClimatePresets()
|
vehicle.GetClimatePresets()
|
||||||
vehicle.GetClimateUserPresets()
|
vehicle.GetClimateUserPresets()
|
||||||
vehicle.GetClimateQuickPresets()
|
vehicle.GetClimateQuickPresets()
|
||||||
}
|
}
|
||||||
|
@ -473,13 +473,20 @@ func (v *Vehicle) GetClimateQuickPresets() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetClimatePresets .
|
// GetClimatePresets .
|
||||||
|
// Used while user uses "quick start engine" button in the app
|
||||||
func (v *Vehicle) GetClimatePresets() {
|
func (v *Vehicle) GetClimatePresets() {
|
||||||
if v.getRemoteOptionsStatus() {
|
if v.getRemoteOptionsStatus() {
|
||||||
v.selectVehicle()
|
v.selectVehicle()
|
||||||
reqURL := MOBILE_API_VERSION + apiURLs["API_G2_FETCH_RES_SUBARU_PRESETS"]
|
reqURL := MOBILE_API_VERSION + apiURLs["API_G2_FETCH_RES_SUBARU_PRESETS"]
|
||||||
resp := v.client.execute(reqURL, GET, map[string]string{}, "", false)
|
resp := v.client.execute(reqURL, GET, map[string]string{}, "", false)
|
||||||
|
|
||||||
respParsed, err := gabs.ParseJSON(resp)
|
tmp := strings.Replace(string(resp), `\\\"`, `"`, -1)
|
||||||
|
tmp = strings.Replace(tmp, `}\",\"{`, `},{`, -1)
|
||||||
|
tmp = strings.Replace(tmp, `[\"{`, `[{`, -1)
|
||||||
|
tmp = strings.Replace(tmp, ` }\"]`, `}]`, -1)
|
||||||
|
tmp = strings.Replace(tmp, `\"`, `"`, -1)
|
||||||
|
|
||||||
|
respParsed, err := gabs.ParseJSON([]byte(tmp))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
v.client.logger.Error("error while parsing json", "request", "GetClimatePresets", "error", err.Error())
|
v.client.logger.Error("error while parsing json", "request", "GetClimatePresets", "error", err.Error())
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user