mkerix/php-bvg

This package is abandoned and no longer maintained. No replacement package was suggested.

An unofficial API for the BVG (Berlin Public Transportation Services) for PHP.

0.1.2 2016-03-21 21:04 UTC

This package is not auto-updated.

Last update: 2021-06-09 08:46:17 UTC


README

Build Status Coverage Status Total Downloads Latest Stable Version Latest Unstable Version License

An unofficial API for the BVG (Berlin Public Transportation Services) for PHP.

Installation

This package can be found on Packagist and is best loaded using Composer.

$ composer require mkerix/php-bvg

Usage

You can search for the ID of a station using a search term:

$stations = BVGApi\Station::getStations('alexanderplatz');

With the ID you can get the departures starting at a given point in time, which is symbolized by a Carbon object:

$time = \Carbon\Carbon::create(2016, 3, 21, 12, 0, 0, 'Europe/Berlin');
$departures = BVGApi\Station::getDepartures(9100003, $time);