{"id":23046799,"url":"https://github.com/0xnu/mothistory","last_synced_at":"2025-08-15T00:33:36.990Z","repository":{"id":109476992,"uuid":"609408883","full_name":"0xnu/mothistory","owner":"0xnu","description":"The SDK provides convenient access to the MOT History API for applications written in the Go Programming Language.","archived":false,"fork":false,"pushed_at":"2025-07-19T03:50:45.000Z","size":81,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T08:51:55.947Z","etag":null,"topics":["autonomous-vehicles","dft","dvsa","dvsa-mot-api","go","golang","government","govuk","mot","mot-history","transport","transportation"],"latest_commit_sha":null,"homepage":"https://safo.dev/NEWMOTAPI","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xnu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-04T04:41:30.000Z","updated_at":"2025-07-19T03:48:39.000Z","dependencies_parsed_at":"2024-12-15T22:29:40.453Z","dependency_job_id":"6e9a4e11-c2d8-4a9d-9a7c-579568aa8e55","html_url":"https://github.com/0xnu/mothistory","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"37d29ed3dac593ce5fe4b8b6c82b3b1927fc1079"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/0xnu/mothistory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xnu%2Fmothistory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xnu%2Fmothistory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xnu%2Fmothistory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xnu%2Fmothistory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xnu","download_url":"https://codeload.github.com/0xnu/mothistory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xnu%2Fmothistory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270505610,"owners_count":24596501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-vehicles","dft","dvsa","dvsa-mot-api","go","golang","government","govuk","mot","mot-history","transport","transportation"],"created_at":"2024-12-15T22:29:18.714Z","updated_at":"2025-08-15T00:33:36.975Z","avatar_url":"https://github.com/0xnu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## MOT History Go SDK\n\n[![Test](https://github.com/0xnu/mothistory/actions/workflows/test.yaml/badge.svg)](https://github.com/0xnu/mothistory/actions/workflows/test.yaml)\n[![Release](https://img.shields.io/github/release/0xnu/mothistory.svg)](https://github.com/0xnu/mothistory/releases/latest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/0xnu/mothistory)](https://goreportcard.com/report/github.com/0xnu/mothistory)\n[![Go Reference](https://pkg.go.dev/badge/github.com/0xnu/mothistory.svg)](https://pkg.go.dev/github.com/0xnu/mothistory)\n[![License](https://img.shields.io/github/license/0xnu/mothistory)](/LICENSE)\n\nThe SDK provides convenient access to the [MOT History API](https://documentation.history.mot.api.gov.uk/) for applications written in the [Go](https://go.dev/) Programming Language.\n\n### Tests\n\nExecute this command: `go test -v`\n\n### Integration Example\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\n\tmothistory \"github.com/0xnu/mothistory\"\n)\n\nconst (\n\tclientID     = \"enter_your_client_id\u003e\"\n\tclientSecret = \"enter_your_client_secret\u003e\"\n\tapiKey       = \"enter_your_api_key\"\n)\n\nfunc main() {\n\tconfig := mothistory.ClientConfig{\n\t\tClientID:     clientID,\n\t\tClientSecret: clientSecret,\n\t\tAPIKey:       apiKey,\n\t}\n\tclient := mothistory.NewClient(config, nil)\n\n\t// Get data by registration\n\tdata, err := client.GetByRegistration(\"ML58FOU\")\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to get data by registration: %v\", err)\n\t}\n\tprintJSON(data)\n\n\t// Get data by VIN\n\tdata, err = client.GetByVIN(\"AISXXXTEST1239617\")\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to get data by VIN: %v\", err)\n\t}\n\tprintJSON(data)\n\n\t// Get bulk download data\n\tdata, err = client.GetBulkDownload()\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to get bulk download data: %v\", err)\n\t}\n\tprintJSON(data)\n\n\t// Renew credentials\n\tdata, err = client.RenewCredentials(apiKey, \"firstname.lastname@example.com\")\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to renew credentials: %v\", err)\n\t}\n\tprintJSON(data)\n}\n\nfunc printJSON[T any](data *T) {\n\tprettyData, err := json.MarshalIndent(data, \"\", \"  \")\n    if err != nil {\n\t\t\tlog.Fatalf(\"failed to marshal vehicle data: %v\", err)\n    }\n    fmt.Println(string(prettyData))\n}\n```\n\n### Setting up a MOT History API\n\nYou can use this support form to request an [API Key](https://documentation.history.mot.api.gov.uk/mot-history-api/register).\n\n\n### Using the MOT History API\n\nYou can read the [API documentation](https://documentation.history.mot.api.gov.uk/) to understand what's possible with the MOT History API. If you need further assistance, don't hesitate to [contact the DVSA](https://documentation.history.mot.api.gov.uk/mot-history-api/support).\n\n\n### License\n\nThis project is licensed under the [MIT License](./LICENSE).\n\n\n### Copyright\n\n(c) 2023 - 2025 [Finbarrs Oketunji](https://finbarrs.eu).\n\nThe MOT History API Go SDK is Licensed under the [Open Government Licence v3.0](\nhttps://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xnu%2Fmothistory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xnu%2Fmothistory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xnu%2Fmothistory/lists"}