{"id":16065882,"url":"https://github.com/marcoroth/tankerkoenig-ruby","last_synced_at":"2026-05-18T04:35:40.365Z","repository":{"id":52174777,"uuid":"149823391","full_name":"marcoroth/tankerkoenig-ruby","owner":"marcoroth","description":"Ruby Wrapper for the Tankerkoenig API","archived":false,"fork":false,"pushed_at":"2021-05-06T09:09:35.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T13:49:13.495Z","etag":null,"topics":["api","json","ruby","tankerkoenig","tankerkoenig-api","wrapper"],"latest_commit_sha":null,"homepage":"https://creativecommons.tankerkoenig.de","language":"Ruby","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/marcoroth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-21T22:09:08.000Z","updated_at":"2022-03-22T08:58:15.000Z","dependencies_parsed_at":"2022-08-24T04:00:26.530Z","dependency_job_id":null,"html_url":"https://github.com/marcoroth/tankerkoenig-ruby","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/marcoroth/tankerkoenig-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Ftankerkoenig-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Ftankerkoenig-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Ftankerkoenig-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Ftankerkoenig-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcoroth","download_url":"https://codeload.github.com/marcoroth/tankerkoenig-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcoroth%2Ftankerkoenig-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274195351,"owners_count":25239147,"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-09-08T02:00:09.813Z","response_time":121,"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":["api","json","ruby","tankerkoenig","tankerkoenig-api","wrapper"],"created_at":"2024-10-09T05:21:21.043Z","updated_at":"2025-10-03T23:33:13.854Z","avatar_url":"https://github.com/marcoroth.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tankerkoenig\n\n![](https://api.travis-ci.com/marcoroth/tankerkoenig-ruby.svg?branch=master)\n\nThis is a Ruby Wrapper for the [Tankerkönig HTTP API](https://creativecommons.tankerkoenig.de).\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tankerkoenig'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tankerkoenig\n\n## Usage\n\nSet the API Token\n\n```ruby\nTankerkoenig.api_key = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'\n```\n\nGet the detail of a single station\n\n```ruby\nTankerkoenig::Station.detail('24a381e3-0d72-416d-bfd8-b2f65f6e5802')\n# =\u003e #\u003cTankerkoenig::Response @ok=true @result=#\u003cTankerkoenig::Station [...]\u003e [...]\u003e\n```\n\nSearch stations in the radius of the given coordinates.\n\n```ruby\nTankerkoenig::Station.list(lat: 52.521, lng: 13.438, rad: 1.5, type: :all, sort: :dist)\n# =\u003e #\u003cTankerkoenig::Response @ok=true @result=[#\u003cTankerkoenig::Station [...]\u003e, #\u003cTankerkoenig::Station [...]\u003e] [...]\u003e\n```\n\nGet the prices of a list of stations\n\n```ruby\nTankerkoenig::Price.get(['4429a7d9-fb2d-4c29-8cfe-2ca90323f9f8', '446bdcf5-9f75-47fc-9cfa-2c3d6fda1c3b', '60c0eefa-d2a8-4f5c-82cc-b5244ecae955', '44444444-4444-4444-4444-444444444444'])\n# or\nTankerkoenig::Price.get('4429a7d9-fb2d-4c29-8cfe-2ca90323f9f8,446bdcf5-9f75-47fc-9cfa-2c3d6fda1c3b,60c0eefa-d2a8-4f5c-82cc-b5244ecae955,44444444-4444-4444-4444-444444444444')\n\n# =\u003e #\u003cTankerkoenig::Response @ok=true @result=[#\u003cTankerkoenig::Price [...]\u003e, #\u003cTankerkoenig::Price [...]\u003e] [...]\u003e\n```\n\nInteracting with the `Tankerkoenig::Station` class.\n\n```ruby\nstations = Tankerkoenig::Station.list(lat: 52.521, lng: 13.438, rad: 1.5, type: :all, sort: :dist).result\nstation = stations.first\n\nstation.brand\n# =\u003e \"TOTAL\"\n\nstation.street\n# =\u003e \"MARGARETE-SOMMER-STR\"\n\nstation.place\n# =\u003e \"BERLIN\"\n\nstation.e5?\n# =\u003e true\n\nstation.e5\n# =\u003e 1.499\n\nstation.e10?\n# =\u003e true\n\nstation.e10\n# =\u003e 1.479\n\nstation.diesel?\n# =\u003e true\n\nstation.diesel\n# =\u003e 1.309\n\nstation.open?\n# =\u003e true\n\nstation.whole_day?\n# =\u003e false\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/marcoroth/tankerkoenig-ruby.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## More Information\n\n[Tankerkoenig Website](https://tankerkoenig.de)\n\n[Tankerkoenig HTTP API](https://creativecommons.tankerkoenig.de)\n\n[RubyGems](https://rubygems.org/gems/tankerkoenig)\n\n[Source Code](https://github.com/marcoroth/tankerkoenig-ruby)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoroth%2Ftankerkoenig-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcoroth%2Ftankerkoenig-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoroth%2Ftankerkoenig-ruby/lists"}