NAME
Travel::Status::DE::EFA - unofficial EFA departure monitor
SYNOPSIS
use Travel::Status::DE::EFA;
my $status = Travel::Status::DE::EFA->new(
efa_url => 'http://efa.vrr.de/vrr/XSLT_DM_REQUEST',
place => 'Essen', name => 'Helenenstr'
);
for my $d ($status->results) {
printf(
"%s %-8s %-5s %s\n",
$d->time, $d->platform_name, $d->line, $d->destination
);
}
VERSION
version 1.12
DESCRIPTION
Travel::Status::DE::EFA is an unofficial interface to EFA-based departure monitors.
It reports all upcoming tram/bus/train departures at a given place.
METHODS
- my $status = Travel::Status::DE::EFA->new(%opt)
-
Requests the departures as specified by opts and returns a new Travel::Status::DE::EFA object. Dies if the wrong opts were passed.
Arguments:
- efa_url => url
-
URL to the EFA service. Known URLs are:
http://212.114.197.7/vgnExt_oeffi/XML_DM_REQUEST (Verkehrsverbund Großraum Nürnberg)
http://efa.vrr.de/vrr/XSLT_DM_REQUEST (Verkehrsverbund Rhein-Ruhr)
http://www2.vvs.de/vvs/XSLT_DM_REQUEST (Verkehrsverbund Stuttgart)
If you found a URL not listed here, please send it to <derf@finalrewind.org>.
- place => place
-
Name of the place/city
- type => address|poi|stop
-
Type of the following name. poi means "point of interest". Defaults to stop (stop/station name).
- name => name
-
address / poi / stop name to list departures for.
- full_routes => 0|1
-
If true: Request full routes for all departures from the backend. This enables the route_pre, route_post and route_interesting accessors in Travel::Status::DE::EFA::Result(3pm).
- timeout => seconds
-
Request timeout, the argument is passed on to LWP::UserAgent(3pm). Default: 10 seconds. Set to 0 or a negative value to disable it.
- $status->errstr
-
In case of an HTTP request or EFA error, returns a string describing it. If none occured, returns undef.
- $status->identified_data
-
Returns a list of the identified values for place and name. For instance, when requesting data for "E", "MartinSTR", identified_data will return ("Essen", "Martinstr.").
- $status->lines
-
Returns a list of Travel::Status::DE::EFA::Line(3pm) objects, each one describing one line servicing the selected station.
- $status->results
-
Returns a list of Travel::Status::DE::EFA::Result(3pm) objects, each one describing one departure.
- Travel::Status::DE::EFA::get_efa_urls()
-
Returns a list of known EFA entry points. Each list element is a hashref with the following elements.
DIAGNOSTICS
None.
DEPENDENCIES
Class::Accessor(3pm)
LWP::UserAgent(3pm)
XML::LibXML(3pm)
BUGS AND LIMITATIONS
Not all features of the web interface are supported.
SEE ALSO
efa-m(1), Travel::Status::DE::EFA::Result(3pm).
AUTHOR
Copyright (C) 2011-2015 by Daniel Friesel <derf@finalrewind.org>
LICENSE
This module is licensed under the same terms as Perl itself.