From e51bb2b0dd1727ba5a799ed63ad40eeae66fd1db Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 10 Sep 2015 16:20:37 +0200 Subject: add BVG and NASA services --- lib/Travel/Status/DE/HAFAS.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index 6589359..7cd1c97 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -15,11 +15,21 @@ use XML::LibXML; our $VERSION = '1.05'; my %hafas_instance = ( + BVG => { + url => 'http://bvg.hafas.de/bin/stboard.exe', + name => 'Berliner Verkehrsgesellschaft', + productbits => [qw[s u tram bus ferry ice regio ondemand]], + }, DB => { url => 'http://reiseauskunft.bahn.de/bin/bhftafel.exe', name => 'Deutsche Bahn', - productbits => [qw[ice ic_ec d nv s bus ferry u tram ondemand x x x x]], - } + productbits => [qw[ice ic_ec d regio s bus ferry u tram ondemand x x x x]], + }, + NASA => { + url => 'http://reiseauskunft.insa.de/bin/stboard.exe', + name => 'Nahverkehrsservice Sachsen-Anhalt', + productbits => [qw[ice ice regio regio regio tram bus ondemand]], + }, ); sub new { @@ -104,7 +114,7 @@ sub set_productfilter { my $service = $self->{active_service}; - if ($service) { + if ($service and exists $hafas_instance{$service}{productbits}) { $self->{post}{productsFilter} = '1' x ( scalar @{ $hafas_instance{$service}{productbits} } ); } -- cgit v1.2.3