Documentation
¶
Index ¶
- Constants
- Variables
- type BulkDelta
- type BulkDownloadResponse
- type Client
- func (c *Client) GetBulkDownload() (*BulkDownloadResponse, error)
- func (c *Client) GetByRegistration(registration string) (*VehicleDetailsResponse, error)
- func (c *Client) GetByVIN(vin string) (*VehicleDetailsResponse, error)
- func (c *Client) RenewCredentials(apiKeyValue, email string) (*ClientSecretResponse, error)
- type ClientConfig
- type ClientSecretResponse
- type Defect
- type MOTTest
- type VehicleDetailsResponse
Constants ¶
View Source
const ( TokenURL = "https://login.microsoftonline.com/a455b827-244f-4c97-b5b4-ce5d13b4d00c/oauth2/v2.0/token" ScopeURL = "https://tapi.dvsa.gov.uk/.default" RPSLimit = 15 BurstLimit = 10 DailyQuota = 500000 )
Variables ¶
View Source
var BaseURL string = "https://history.mot.api.gov.uk/v1/trade/vehicles"
Functions ¶
This section is empty.
Types ¶
type BulkDownloadResponse ¶ added in v1.0.7
type BulkDownloadResponse struct {
Bulk []BulkDelta `json:"bulk"`
Delta []BulkDelta `json:"delta"`
}
Response for {baseURL}/[bulk-download]
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetBulkDownload ¶ added in v1.0.2
func (c *Client) GetBulkDownload() (*BulkDownloadResponse, error)
func (*Client) GetByRegistration ¶
func (c *Client) GetByRegistration(registration string) (*VehicleDetailsResponse, error)
func (*Client) GetByVIN ¶ added in v1.0.2
func (c *Client) GetByVIN(vin string) (*VehicleDetailsResponse, error)
func (*Client) RenewCredentials ¶ added in v1.0.2
func (c *Client) RenewCredentials(apiKeyValue, email string) (*ClientSecretResponse, error)
type ClientConfig ¶ added in v1.0.2
type ClientSecretResponse ¶ added in v1.0.7
type ClientSecretResponse struct {
ClientSecret string `json:"clientSecret"`
}
Response for v1/trade/[credentials]
type MOTTest ¶ added in v1.0.7
type MOTTest struct {
CompletedDate string `json:"completedDate"`
TestResult string `json:"testResult"`
ExpiryDate string `json:"expiryDate"`
OdometerValue string `json:"odometerValue"`
OdometerUnit string `json:"odometerUnit"`
OdometerResultType string `json:"odometerResultType"`
MotTestNumber string `json:"motTestNumber"`
DataSource string `json:"dataSource"`
Location string `json:"location,omitempty"` // Optional field
Defects []Defect `json:"defects,omitempty"` // Optional field
}
type VehicleDetailsResponse ¶ added in v1.0.7
type VehicleDetailsResponse struct {
Registration string `json:"registration"`
Make string `json:"make"`
FirstUsedDate string `json:"firstUsedDate"`
FuelType string `json:"fuelType"`
PrimaryColour string `json:"primaryColour"`
RegistrationDate string `json:"registrationDate"`
ManufactureDate string `json:"manufactureDate"`
EngineSize string `json:"engineSize"`
HasOutstandingRecall string `json:"hasOutstandingRecall"`
MotTests []MOTTest `json:"motTests"`
}
Response for {baseURL}/[registration|vin]/<registration|vin>
Click to show internal directories.
Click to hide internal directories.