summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-09-10 16:20:37 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-09-10 16:20:37 +0200
commite51bb2b0dd1727ba5a799ed63ad40eeae66fd1db (patch)
tree16682a0d32136f8b001465e948cc7dbf65fd57f9 /lib/Travel
parent91505f61f68fa35977d5d913b5b9cc2800f9b68c (diff)
add BVG and NASA services
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm16
1 files 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} } );
}