summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Helper/HAFAS.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-08-20 19:44:51 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-08-20 19:44:51 +0200
commit465c131a6324c4c1d151d82829384652e1740238 (patch)
tree290892b1b42740556abf38e9864ffae96c5772e7 /lib/DBInfoscreen/Helper/HAFAS.pm
parentad9d8e40b3677342cb7409f3ee5d769c6d72b228 (diff)
Backend selection: add coverage maps4.29.13
Diffstat (limited to 'lib/DBInfoscreen/Helper/HAFAS.pm')
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm
index a55f03f..0400d59 100644
--- a/lib/DBInfoscreen/Helper/HAFAS.pm
+++ b/lib/DBInfoscreen/Helper/HAFAS.pm
@@ -28,6 +28,18 @@ sub new {
}
+sub get_coverage {
+ my ( $self, $service ) = @_;
+
+ my $service_definition = Travel::Status::DE::HAFAS::get_service($service);
+
+ if ( not $service_definition ) {
+ return {};
+ }
+
+ return $service_definition->{coverage}{area} // {};
+}
+
sub get_route_p {
my ( $self, %opt ) = @_;