{"id":20932909,"url":"https://github.com/jferrl/go-merche","last_synced_at":"2026-05-12T16:37:31.187Z","repository":{"id":48968407,"uuid":"512692499","full_name":"jferrl/go-merche","owner":"jferrl","description":"Go library for accessing the Mercedes-Benz vehicles API","archived":false,"fork":false,"pushed_at":"2023-12-26T09:55:09.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T19:26:12.634Z","etag":null,"topics":["go","golang","mercedes-benz-vehicles","vehicle-communication"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jferrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-11T09:25:15.000Z","updated_at":"2022-09-08T17:14:01.000Z","dependencies_parsed_at":"2024-11-18T21:54:06.567Z","dependency_job_id":"6cd92961-f81e-47f9-9ab2-f19b23287f30","html_url":"https://github.com/jferrl/go-merche","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferrl%2Fgo-merche","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferrl%2Fgo-merche/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferrl%2Fgo-merche/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferrl%2Fgo-merche/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jferrl","download_url":"https://codeload.github.com/jferrl/go-merche/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243325422,"owners_count":20273287,"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","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":["go","golang","mercedes-benz-vehicles","vehicle-communication"],"created_at":"2024-11-18T21:53:44.608Z","updated_at":"2025-12-28T16:25:15.254Z","avatar_url":"https://github.com/jferrl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-merche\n\n[![GoDoc](https://img.shields.io/static/v1?label=godoc\u0026message=reference\u0026color=blue)](https://pkg.go.dev/github.com/jferrl/go-merche)\n[![Test Status](https://github.com/jferrl/go-merche/workflows/tests/badge.svg)](https://github.com/jferrl/go-merche/actions?query=workflow%3Atests)\n[![codecov](https://codecov.io/gh/jferrl/go-merche/branch/main/graph/badge.svg?token=68I4BZF235)](https://codecov.io/gh/jferrl/go-merche)\n\nGo library for accessing the Mercedes-Benz vehicles API. :auto_rickshaw:\n\n## Why go-merche?\n\nWith the launch of connected cars on the market, some brands such as Mercedes-Benz have created a set of APIs with which we can access in \"real\" time data that our vehicles are generating, in addition to other additional services that may not be intrinsically related to vehicles.\n\nThe idea of this package is to provide a set of methods to be able to access the Mercedes-Benz APIs using the Go programming language.\n\nLast but not least, the name of the pkg :sunglasses: . I name it \"go-merche\" just because \"Merche\" the diminutive of \"Mercedes\" said affectively in Spanish.\n\n## Usage\n\ngo-merche is compatible with modern Go releases.\n\nBuild a new client, then you can use the services to reach different parts of the Mercedes API. For example:\n\n```go\nimport (\n    \"context\"\n\n    \"github.com/jferrl/go-merche\"\n    )\n\nfunc main() {\n ctx := context.Background()\n \n client := merche.NewClient(nil)\n\n opts := \u0026merche.Options{ VehicleID: \"EXVETESTVIN000001\" }\n resources, _, err := client.Resources.GetAvailableResources(ctx, opts)\n}\n```\n\nUsing the `context` package, you can easily pass cancelation signals and\ndeadlines to various services of the client for handling a request.\n\n## How to enable mercedes APIs\n\n1) Own a Mercedes Benz Car with Mercedes me installed and working.\n2) Create an application in \u003chttps://developer.mercedes-benz.com/\u003e\n3) Register to the following APIs (all of them):\n   - [Electric Vehicle Status](https://developer.mercedes-benz.com/products/electric_vehicle_status)\n   - [Fuel Status](https://developer.mercedes-benz.com/products/fuel_status)\n   - [Pay As You Drive Insurance](https://developer.mercedes-benz.com/products/pay_as_you_drive_insurance)\n   - [Vehicle Lock Status](https://developer.mercedes-benz.com/products/vehicle_lock_status)\n   - [Vehicle Status](https://developer.mercedes-benz.com/products/vehicle_status)\n\n## Token Creation\n\nTo create a Mercedes API token it's necessary to perform the following steps:\n\n1) Create the APP and register it to all APIs as describe in \"How to enable mercedes APIs\"\n2) Logout in all browser from Mercedes Me (Developer site included)\n3) Execute the \"mercedes_api_oauth\" example with your personal client_id and client_secret\n4) Using your Mercedes Me credential log in: a new web-page will ask to authorize the APP created in the step 1 to access to the personal information associated to the APIs registered\n5) Enable all information and press Allow\n\n## Authentication\n\nThe `go-merche` library does not handle authentication. So that, when\ncreating a new client, pass an `http.Client` that can handle authentication.\nThe Recommended way to do this is using the oauth2 golang pkg.\n\n```go\nimport \"golang.org/x/oauth2\"\n\nfunc main() {\n ctx := context.Background()\n ts := oauth2.StaticTokenSource(\n  \u0026oauth2.Token{AccessToken: \"... your access token ...\"},\n )\n tc := oauth2.NewClient(ctx, ts)\n\n client := merche.NewClient(tc)\n}\n```\n\nWhen using an authenticated Client, all calls made by the client will\ninclude the specified OAuth token.\n\nHere you can find an example of how to authenticate with Mercedes\nOAuth API \u003chttps://github.com/jferrl/go-merche/tree/main/example/mercedes_api_oauth\u003e\n\n## Mercedes API connections\n\nThe `go-merche` pkg implements services to connect against the following Mercedes APIs:\n\n- [Fuel Status](https://developer.mercedes-benz.com/products/fuel_status) :white_check_mark:\n- [Pay As You Drive Insurance](https://developer.mercedes-benz.com/products/pay_as_you_drive_insurance) :white_check_mark:\n- [Vehicle Lock Status](https://developer.mercedes-benz.com/products/vehicle_lock_status) :white_check_mark:\n- [Vehicle Status](https://developer.mercedes-benz.com/products/vehicle_status) :white_check_mark:\n- [Electric Vehicle Status](https://developer.mercedes-benz.com/products/electric_vehicle_status) :white_check_mark:\n\nTake into account that the pkg services are reaching API containers to get all the avalible resources\nin the same API call. In future releases, `go-merche` will implement individual methods to get data from\na specific resource from the Mercedes API. :construction:\n\n## Use cases\n\n- Get real data from Mercedes-Benz vehicles.\n- IOT proyects. Just take a look to \u003chttps://tinygo.org/\u003e.\n- ...and many more :stuck_out_tongue_winking_eye:\n\n## License\n\nThis library is distributed under the BSD-style license found in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjferrl%2Fgo-merche","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjferrl%2Fgo-merche","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjferrl%2Fgo-merche/lists"}