summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-10-14 21:16:27 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-10-14 21:16:27 +0200
commita43e50f5feb3f9105f30094e9bdf0f5a194df09f (patch)
tree46305e5accfd30ec26b81c1cd30aeb4068e8c255 /lib/Travel
parent09b3f8727b593a9d7ab9100aeee78a07c520ff80 (diff)
EFA: Add static get_services method
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/EFA.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index 725035f..5712fba 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -626,6 +626,18 @@ sub get_service_ids {
return Travel::Status::DE::EFA::Services::get_service_ids(@_);
}
+sub get_services {
+ my @services;
+ for my $service ( Travel::Status::DE::EFA::Services::get_service_ids() ) {
+ say $service;
+ my %desc
+ = %{ Travel::Status::DE::EFA::Services::get_service($service) };
+ $desc{shortname} = $service;
+ push( @services, \%desc );
+ }
+ return @services;
+}
+
# static
sub get_service {
return Travel::Status::DE::EFA::Services::get_service(@_);
@@ -845,6 +857,11 @@ strings, e.g. "DE" or "CH-BE").
=back
+=item Travel::Status::DE::EFA::get_services()
+
+Returns a list of hashrefs describing all supported services. In addition
+to the keys listed above, each service contains a B<shortname> (service ID).
+
=back
=head1 DIAGNOSTICS