summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Helper
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DBInfoscreen/Helper')
-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 ) = @_;