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
Requires
- php: ^7.0
- nesbot/carbon: ^1.21
- paquettg/php-html-parser: ^1.6
- rmccue/requests: ^1.6
Requires (Dev)
- phpunit/phpunit: 5.2.*
This package is not auto-updated.
Last update: 2021-06-09 08:46:17 UTC
README
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);