summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/DBRIS/Location.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-12-14 22:22:38 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-12-14 22:22:38 +0100
commit87637c4f37a798718e75b5b9d7fb08a6fc606349 (patch)
treee13dcc70a25b6091e39325141a595de4b81ba9fd /lib/Travel/Status/DE/DBRIS/Location.pm
parent091f9fa04b5a44e8ccecc65b0dc22dc0d12a94d2 (diff)
add preliminary departure board support
Diffstat (limited to 'lib/Travel/Status/DE/DBRIS/Location.pm')
-rw-r--r--lib/Travel/Status/DE/DBRIS/Location.pm20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/Travel/Status/DE/DBRIS/Location.pm b/lib/Travel/Status/DE/DBRIS/Location.pm
index bb9a3ce..f053f2b 100644
--- a/lib/Travel/Status/DE/DBRIS/Location.pm
+++ b/lib/Travel/Status/DE/DBRIS/Location.pm
@@ -9,7 +9,8 @@ use parent 'Class::Accessor';
our $VERSION = '0.01';
Travel::Status::DE::DBRIS::Location->mk_ro_accessors(
- qw(eva id lat lon name products type));
+ qw(eva id lat lon name products type is_cancelled is_additional is_separation display_priority)
+);
sub new {
my ( $obj, %opt ) = @_;
@@ -17,13 +18,16 @@ sub new {
my $json = $opt{json};
my $ref = {
- eva => $json->{extId},
- id => $json->{id},
- lat => $json->{lat},
- lon => $json->{lon},
- name => $json->{name},
- products => $json->{products},
- type => $json->{type},
+ eva => $json->{extId} // $json->{evaNumber},
+ id => $json->{id},
+ lat => $json->{lat},
+ lon => $json->{lon},
+ name => $json->{name},
+ products => $json->{products},
+ type => $json->{type},
+ is_cancelled => $json->{canceled},
+ is_additional => $json->{additional},
+
};
bless( $ref, $obj );