From 5c26e3b6a426343e2b3f852311fe0028ab7d75b8 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 28 Sep 2024 09:40:36 +0200 Subject: Move static service accessors to Travel::Status::DE::EFA --- lib/Travel/Status/DE/EFA.pm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'lib/Travel/Status/DE/EFA.pm') diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm index b95ff41..6aa505b 100644 --- a/lib/Travel/Status/DE/EFA.pm +++ b/lib/Travel/Status/DE/EFA.pm @@ -404,6 +404,16 @@ sub result { return Travel::Status::DE::EFA::Trip->new( json => $self->{response} ); } +# static +sub get_service_ids { + return Travel::Status::DE::EFA::Services::get_service_ids(@_); +} + +# static +sub get_service { + return Travel::Status::DE::EFA::Services::get_service(@_); +} + 1; __END__ @@ -547,6 +557,41 @@ nothing (undef / empty list) otherwise. Returns a list of Travel::Status::DE::EFA::Departure(3pm) objects, each one describing one departure. +=item Travel::Status::DE::EFA::get_service_ids() + +Returns the list of supported services (backends). + +=item Travel::Status::DE::EFA::get_service(I) + +Returns a hashref describing the requested I ID with the following keys. + +=over + +=item B => I + +Provider name, e.g. Verkehrsverbund Oberelbe. + +=item B => I + +Backend base URL. + +=item B => I (optional) + +Provider homepage. + +=item B => I (optional) + +Supportde languages, e.g. de, en. + +=item B => I + +Area in which the service provides near-optimal coverage. Typically, this +means a (nearly) complete list of departures and real-time data. The +hashref contains two optional keys: B (GeoJSON) and B (list of +strings, e.g. "DE" or "CH-BE"). + +=back + =back =head1 DIAGNOSTICS -- cgit v1.2.3