mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-13 11:15:25 +00:00
35 lines
607 B
Markdown
Executable File
35 lines
607 B
Markdown
Executable File
# Vehicle
|
|
|
|
An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/vehicle/api](https://m3o.com/vehicle/api).
|
|
|
|
Endpoints:
|
|
|
|
## Lookup
|
|
|
|
Lookup a UK vehicle by it's registration number
|
|
|
|
|
|
[https://m3o.com/vehicle/api#Lookup](https://m3o.com/vehicle/api#Lookup)
|
|
|
|
```go
|
|
package example
|
|
|
|
import(
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/vehicle"
|
|
)
|
|
|
|
// Lookup a UK vehicle by it's registration number
|
|
func LookupVehicle() {
|
|
vehicleService := vehicle.NewVehicleService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := vehicleService.Lookup(&vehicle.LookupRequest{
|
|
Registration: "LC60OTA",
|
|
|
|
})
|
|
fmt.Println(rsp, err)
|
|
|
|
}
|
|
```
|