package main
import(
"context"
"log"
gosdkv2 "github.com/smartcar/go-sdk-v2"
"github.com/smartcar/go-sdk-v2/pkg/models/shared"
"github.com/smartcar/go-sdk-v2/pkg/models/operations"
)
func main() {
s := gosdkv2.New(
gosdkv2.WithSecurity(shared.Security{
BasicAuth: &shared.SchemeBasicAuth{
Password: "",
Username: "",
},
}),
)
ctx := context.Background()
res, err := s.Vehicles.GetLocation(ctx, operations.GetLocationRequest{
VehicleID: "36ab27d0-fd9d-4455-823a-ce30af709ffc",
})
if err != nil {
log.Fatal(err)
}
if res.Location != nil {
// handle response
}
}