2017 © Pedro Peláez
 

library tankerkoenig-php-client

image

lxlang/tankerkoenig-php-client

  • Friday, August 18, 2017
  • by lxlang
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Tankstellenkönig API client

Simple Client for tankstellenkoenig.de json api., (*1)

Inspired by https://github.com/tankerkoenig/tankerkoenig-php-client/, (*2)

Install

composer require lxlang/tankerkoenig-php-client

API-KEY

The free Tankerkönig-Spritpreis-API is under creative commons., (*3)

Get your own API-Key here: https://creativecommons.tankerkoenig.de, (*4)

Usage

Init API client

use Lang\Tankerkoenig\ApiClient;
$apiClient = new ApiClient("your-api-key-here");

search for gas stations by location

// get over
$gasStations = $apiClient->search(
    50.538472, //lat
    8.649647, //lng
    $apiClient::TYPE_E10 //your type of fuel
);

//echo results for testing
print_r($gasStations);

Gas Station details

//unique id of a gas station
$gasStationUuid = '51d4b6a2-a095-1aa0-e100-80009459e03a';

// returns an object of type \Lang\Tankerkoenig\GasStatsion
$gasStation = $apiClient->detail($gasStationUuid);

print_r($gasStation);

The Versions

18/08 2017

dev-master

9999999-dev

  Sources   Download

by Tobias Lang

18/08 2017

0.0.1

0.0.1.0

  Sources   Download

by Tobias Lang