Unverified Commit a43e50f5 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

EFA: Add static get_services method

parent 09b3f872
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -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