mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 15:51:24 +00:00
add vehicle api (#221)
* add vehicle api * Commit from GitHub Actions (Publish APIs & Clients) Co-authored-by: asim <asim@users.noreply.github.com>
This commit is contained in:
16
examples/vehicle/lookup/go/lookupVehicle.go
Executable file
16
examples/vehicle/lookup/go/lookupVehicle.go
Executable file
@@ -0,0 +1,16 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/vehicle"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Lookup a UK vehicle by it's registration number
|
||||
func LookupVehicle() {
|
||||
vehicleService := vehicle.NewVehicleService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := vehicleService.Lookup(&vehicle.LookupRequest{
|
||||
Registration: "LC60OTA",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user