func (v *API) HomeRegion(vin string) error {
	var res HomeRegion
	uri := fmt.Sprintf("%s/cs/vds/v1/vehicles/%s/homeRegion", RegionAPI, vin)

	err := v.getJSON(uri, &res)
	if err == nil {
		if api := res.HomeRegion.BaseURI.Content; strings.HasPrefix(api, "https://mal-3a.prd.eu.dp.vwg-connect.com") {
			api = "https://fal" + strings.TrimPrefix(api, "https://mal")
			api = strings.TrimSuffix(api, "/api") + "/fs-car"
			v.baseURI = api
		}
	}

	return err
}
// HomeRegion updates the home region for the given vehicle
HomeRegion updates the home region for the given vehicle
// HomeRegion updates the home region for the given vehicle
func (v *API) HomeRegion(vin string) error {
	var res HomeRegion
	uri := fmt.Sprintf("%s/cs/vds/v1/vehicles/%s/homeRegion", RegionAPI, vin)
	err := v.getJSON(uri, &res)
	if err == nil {
		if api := res.HomeRegion.BaseURI.Content; strings.HasPrefix(api, "https://mal-3a.prd.eu.dp.vwg-connect.com") {
			api = "https://fal" + strings.TrimPrefix(api, "https://mal")
			api = strings.TrimSuffix(api, "/api") + "/fs-car"
			v.baseURI = api
		}
	}
	return err
}
func ( v * API ) HomeRegion ( vin string ) error { var res HomeRegion uri := fmt . Sprintf ( " " , RegionAPI , vin ) err := v . getJSON ( uri , & res ) if err == nil { if api := res . HomeRegion . BaseURI . Content ; strings . HasPrefix ( api , " " ) { api = " " + strings . TrimPrefix ( api , " " ) api = strings . TrimSuffix ( api , " " ) + " " v . baseURI = api } } return err }
HomeRegion updates the home region for the given vehicle
HomeRegion updates the home region for the given vehicle