func (v Vehicle) autoPark(action string) error {
	apiUrl := BaseURL + "/vehicles/" + strconv.FormatInt(v.ID, 10) + "/command/autopark_request"
	driveState, _ := v.DriveState()
	autoParkRequest := &AutoParkRequest{
		VehicleID: v.VehicleID,
		Lat:       driveState.Latitude,
		Lon:       driveState.Longitude,
		Action:    action,
	}
	body, _ := json.Marshal(autoParkRequest)
	_, err := sendCommand(apiUrl, body)
	return err
}
Performs the actual auto park/summon request for the vehicle
package tesla
import (
	"encoding/json"
	"errors"
	"strconv"
)
type CommandResponse struct {
	Response struct {
		Reason string `json:"reason"`
		Result bool   `json:"result"`
	} `json:"response"`
}
type AutoParkRequest struct {
	VehicleID int     `json:"vehicle_id,omitempty"`
	Lat       float64 `json:"lat"`
	Lon       float64 `json:"lon"`
	Action    string  `json:"action,omitempty"`
}
type SentryData struct {
	Mode string `json:"on"`
}
func (v Vehicle) AutoparkAbort() error {
	return v.autoPark("abort")
}
func (v Vehicle) AutoparkForward() error {
	return v.autoPark("start_forward")
}
func (v Vehicle) AutoparkReverse() error {
	return v.autoPark("start_reverse")
}