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->time,
			$departure->line,
			$departure->destination,
			$departure->platform,
		);
	}

VERSION

version 2.01

DESCRIPTION

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

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

None.

DEPENDENCIES

* Class::Accessor(3pm)
* LWP::UserAgent(3pm)
* Travel::Status::DE::HAFAS(3pm)
* XML::LibXML(3pm)

BUGS AND LIMITATIONS

Unknown.

SEE ALSO

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

AUTHOR

Copyright (C) 2015 by Daniel Friesel <derf@finalrewind.org>

LICENSE

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