NAME

Travel::Status::DE::DeutscheBahn - Interface to the online arrival/departure monitor operated by Deutsche Bahn

SYNOPSIS

use Travel::Status::DE::DeutscheBahn;

my $status = Travel::Status::DE::DeutscheBahn->new(
	station => 'Essen Hbf',
);

if (my $err = $status->errstr) {
	die("Request error: ${err}\n");
}

for my $departure ($status->results) {
	printf(
		"At %s: %s to %s from platform %s\n",
		$departure->datetime->strftime('%H:%M'),
		$departure->line,
		$departure->destination,
		$departure->platform,
	);
}

VERSION

version 6.08

DESCRIPTION

Travel::Status::DE::DeutscheBahn is an interface to the Deutsche Bahn departure monitor available at https://reiseauskunft.bahn.de/bin/mgate.exe.

It takes a station name and (optional) date and time and reports all arrivals or departures at that station starting at the specified point in time (now if unspecified).

METHODS

my $status = Travel::Status::DE::DeutscheBahn->new(%opts)

Requests the departures/arrivals as specified by opts and returns a new Travel::Status::DE::HAFAS element with the results. Dies if the wrong opts were passed.

Calls Travel::Status::DE::HAFAS->new with service = DB. All opts are passed on. Please see Travel::Status::DE::HAFAS(3pm) for opts documentation and other methdos.

DIAGNOSTICS

See Travel::Status::DE::HAFAS(3pm).

DEPENDENCIES

  • Travel::Status::DE::HAFAS(3pm)

BUGS AND LIMITATIONS

See Travel::Status::DE::HAFAS(3pm).

SEE ALSO

Travel::Status::DE::HAFAS(3pm).

AUTHOR

Copyright (C) 2015-2022 by Birte Kristina Friesel <derf@finalrewind.org>

LICENSE

This module is licensed under the same terms as Perl itself.