summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-17 20:46:42 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-17 20:46:42 +0200
commitf37619e2890ad4f3b36c49117ead8bcdcf2af28e (patch)
tree4de04e3918ab65f9876349a4a45095eac02de93d
parent8117d9db6f363cf6b8ea1dcbe9816105011abbb9 (diff)
Release v2.012.01
-rw-r--r--Changelog7
-rwxr-xr-xbin/efa-m4
-rw-r--r--lib/Travel/Status/DE/EFA.pm29
-rw-r--r--lib/Travel/Status/DE/EFA/Line.pm4
-rw-r--r--lib/Travel/Status/DE/EFA/Result.pm4
-rw-r--r--lib/Travel/Status/DE/EFA/Stop.pm4
-rw-r--r--lib/Travel/Status/DE/VRR.pm4
7 files changed, 44 insertions, 12 deletions
diff --git a/Changelog b/Changelog
index 6d881e8..2141937 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,10 @@
+Travel::Status::DE::VRR 2.01 - Fri May 17 2024
+
+ * efa-m: Deprecate --efa-url in favour of --service. It is still supported,
+ just not documented anymore.
+ * EFA: Add new_p constructor for asynchronous operation with promises
+ * EFA: Add static get_service function
+
Travel::Status::DE::VRR 2.00 - Sun Dec 03 2023
* New dependency: DateTime
diff --git a/bin/efa-m b/bin/efa-m
index 532843f..b19b11e 100755
--- a/bin/efa-m
+++ b/bin/efa-m
@@ -4,7 +4,7 @@ use warnings;
use 5.010;
use utf8;
-our $VERSION = '2.00';
+our $VERSION = '2.01';
binmode( STDOUT, ':encoding(utf-8)' );
@@ -430,7 +430,7 @@ B<efa-m> [B<-Lr>] [B<-d> I<dd.mm.yyyy>] [B<-t> I<hh:mm>]
=head1 VERSION
-version 2.00
+version 2.01
=head1 DESCRIPTION
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index b9ced2e..d0d0094 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -5,7 +5,7 @@ use warnings;
use 5.010;
use utf8;
-our $VERSION = '2.00';
+our $VERSION = '2.01';
use Carp qw(confess cluck);
use DateTime;
@@ -740,7 +740,7 @@ Travel::Status::DE::EFA - unofficial EFA departure monitor
=head1 VERSION
-version 2.00
+version 2.01
=head1 DESCRIPTION
@@ -806,6 +806,26 @@ Default: 10 seconds. Set to 0 or a negative value to disable it.
=back
+=item my $status_p = Travel::Status::DE::EFA->new_p(I<%opt>)
+
+Returns a promise that resolves into a Travel::Status::DE::EFA instance
+($status) on success and rejects with an error message on failure. In addition
+to the arguments of B<new>, the following mandatory arguments must be set.
+
+=over
+
+=item B<promise> => I<promises module>
+
+Promises implementation to use for internal promises as well as B<new_p> return
+value. Recommended: Mojo::Promise(3pm).
+
+=item B<user_agent> => I<user agent>
+
+User agent instance to use for asynchronous requests. The object must implement
+a B<post_p> function. Recommended: Mojo::UserAgent(3pm).
+
+=back
+
=item $status->errstr
In case of an HTTP request or EFA error, returns a string describing it. If
@@ -854,6 +874,11 @@ the following elements.
=back
+=item Travel::Status::DE::EFA::service(I<$service>)
+
+Returns a hashref describing the service I<$service>, or undef if it is not
+known. See B<get_efa_urls> for the hashref layout.
+
=back
=head1 DIAGNOSTICS
diff --git a/lib/Travel/Status/DE/EFA/Line.pm b/lib/Travel/Status/DE/EFA/Line.pm
index 565ca53..1979a5e 100644
--- a/lib/Travel/Status/DE/EFA/Line.pm
+++ b/lib/Travel/Status/DE/EFA/Line.pm
@@ -6,7 +6,7 @@ use 5.010;
use parent 'Class::Accessor';
-our $VERSION = '2.00';
+our $VERSION = '2.01';
Travel::Status::DE::EFA::Line->mk_ro_accessors(
qw(direction mot name operator route type valid));
@@ -57,7 +57,7 @@ requested station
=head1 VERSION
-version 2.00
+version 2.01
=head1 DESCRIPTION
diff --git a/lib/Travel/Status/DE/EFA/Result.pm b/lib/Travel/Status/DE/EFA/Result.pm
index ee1eafd..a326298 100644
--- a/lib/Travel/Status/DE/EFA/Result.pm
+++ b/lib/Travel/Status/DE/EFA/Result.pm
@@ -6,7 +6,7 @@ use 5.010;
use parent 'Class::Accessor';
-our $VERSION = '2.00';
+our $VERSION = '2.01';
Travel::Status::DE::EFA::Result->mk_ro_accessors(
qw(countdown datetime delay destination is_cancelled info key line lineref
@@ -136,7 +136,7 @@ departure received by Travel::Status::DE::EFA
=head1 VERSION
-version 2.00
+version 2.01
=head1 DESCRIPTION
diff --git a/lib/Travel/Status/DE/EFA/Stop.pm b/lib/Travel/Status/DE/EFA/Stop.pm
index d313b9c..c77daa7 100644
--- a/lib/Travel/Status/DE/EFA/Stop.pm
+++ b/lib/Travel/Status/DE/EFA/Stop.pm
@@ -6,7 +6,7 @@ use 5.010;
use parent 'Class::Accessor';
-our $VERSION = '2.00';
+our $VERSION = '2.01';
Travel::Status::DE::EFA::Stop->mk_ro_accessors(
qw(arr dep name name_suf platform));
@@ -47,7 +47,7 @@ in a Travel::Status::DE::EFA::Result's route
=head1 VERSION
-version 2.00
+version 2.01
=head1 DESCRIPTION
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index e6124bf..ceabe61 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -4,7 +4,7 @@ use strict;
use warnings;
use 5.010;
-our $VERSION = '2.00';
+our $VERSION = '2.01';
use parent 'Travel::Status::DE::EFA';
@@ -43,7 +43,7 @@ Travel::Status::DE::VRR - unofficial VRR departure monitor.
=head1 VERSION
-version 2.00
+version 2.01
=head1 DESCRIPTION