diff options
author | networkException <git@nwex.de> | 2025-04-18 12:27:41 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-04-21 13:01:05 +0200 |
commit | 6dab985966f2a67a9acfdc5b442b16d5e65b7079 (patch) | |
tree | 049e752d3cfdfbc4dbfa41494f86922502a68a9d /lib/DBInfoscreen.pm | |
parent | 75411af57219a256a767361cb7c8caae1477ba9c (diff) |
Initial MOTIS backend support
This patch adds support for displaying coverage and trip
maps for MOTIS.
Diffstat (limited to 'lib/DBInfoscreen.pm')
-rw-r--r-- | lib/DBInfoscreen.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index b0bac14..18a2c87 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -10,6 +10,7 @@ use Cache::File; use DBInfoscreen::Helper::DBRIS; use DBInfoscreen::Helper::EFA; use DBInfoscreen::Helper::HAFAS; +use DBInfoscreen::Helper::MOTIS; use DBInfoscreen::Helper::Wagonorder; use File::Slurp qw(read_file); use JSON; @@ -107,6 +108,20 @@ sub startup { ); $self->helper( + motis => sub { + my ($self) = @_; + state $motis = DBInfoscreen::Helper::MOTIS->new( + log => $self->app->log, + main_cache => $self->app->cache_iris_main, + realtime_cache => $self->app->cache_iris_rt, + root_url => $self->url_for('/')->to_abs, + user_agent => $self->ua, + version => $self->config->{version}, + ); + } + ); + + $self->helper( efa => sub { my ($self) = @_; state $efa = DBInfoscreen::Helper::EFA->new( |