More changes
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 23s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 23s
This commit is contained in:
18
vehicle.go
18
vehicle.go
@ -482,11 +482,23 @@ func (v *Vehicle) GetClimatePresets() {
|
||||
|
||||
v.client.logger.Debug("subaru climate presets http output", "body", resp)
|
||||
|
||||
respParsed, err := gabs.ParseJSON([]byte(resp))
|
||||
tmp := struct {
|
||||
Success bool `json:"success"`
|
||||
ErrorCode string `json:"errorCode"`
|
||||
DataName string `json:"dataName"`
|
||||
Data any `json:"data"`
|
||||
}{}
|
||||
err := json.Unmarshal(resp, &tmp)
|
||||
if err != nil {
|
||||
v.client.logger.Error("error while parsing json", "request", "GetClimatePresets", "error", err.Error())
|
||||
}
|
||||
v.client.logger.Debug("subaru climate presets parsed http output", "body", respParsed)
|
||||
v.client.logger.Debug("subaru climate presets parsed http output", "body", tmp)
|
||||
|
||||
// respParsed, err := gabs.ParseJSON([]byte(resp))
|
||||
// if err != nil {
|
||||
// v.client.logger.Error("error while parsing json", "request", "GetClimatePresets", "error", err.Error())
|
||||
// }
|
||||
// v.client.logger.Debug("subaru climate presets parsed http output", "body", respParsed)
|
||||
|
||||
// tmp1 := strings.ReplaceAll(string(resp), "\\\\"", "\"")
|
||||
// v.client.logger.Debug("subaru climate presets after trimming #1", "body", tmp1)
|
||||
@ -498,7 +510,7 @@ func (v *Vehicle) GetClimatePresets() {
|
||||
// v.client.logger.Debug("subaru climate presets after trimming #4", "body", tmp4)
|
||||
// tmp5 := strings.ReplaceAll(tmp4, `\"`, `"`)
|
||||
|
||||
v.client.logger.Debug("subaru climate presets before trimming", "body", respParsed)
|
||||
// v.client.logger.Debug("subaru climate presets before trimming", "body", respParsed)
|
||||
|
||||
// // ONLY FOR THAT REQUEST BECAUSE OF API SENDS BACK ESCAPING DATA IN DATA FIELD
|
||||
// data, ok := respParsed.Path("data").Data().(string)
|
||||
|
Reference in New Issue
Block a user