summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/VRR.pm12
-rw-r--r--lib/Travel/Status/DE/VRR/Result.pm4
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index 4e647c2..156e815 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -110,7 +110,7 @@ sub new {
return $self;
}
-sub new_from_html {
+sub new_from_xml {
my ( $class, %opt ) = @_;
my $self = { xml => $opt{xml}, };
@@ -156,10 +156,11 @@ sub results {
$e_time->getAttribute('hour'),
$e_time->getAttribute('minute'),
);
- my $platform = $e->getAttribute('platform');
- my $line = $e_line->getAttribute('number');
- my $dest = $e_line->getAttribute('direction');
- my $info = undef;
+ my $platform = $e->getAttribute('platform');
+ my $line = $e_line->getAttribute('number');
+ my $dest = $e_line->getAttribute('direction');
+ my $info = undef;
+ my $countdown = $e->getAttribute('countdown');
push(
@results,
@@ -169,6 +170,7 @@ sub results {
platform => $platform,
line => $line,
destination => $dest,
+ countdown => $countdown,
info => $info,
)
);
diff --git a/lib/Travel/Status/DE/VRR/Result.pm b/lib/Travel/Status/DE/VRR/Result.pm
index 0b2abf0..93df048 100644
--- a/lib/Travel/Status/DE/VRR/Result.pm
+++ b/lib/Travel/Status/DE/VRR/Result.pm
@@ -9,7 +9,9 @@ use parent 'Class::Accessor';
our $VERSION = '0.02';
Travel::Status::DE::VRR::Result->mk_ro_accessors(
- qw(destination time platform line info));
+ qw(destination date time platform line info
+ countdown type)
+);
sub new {
my ( $obj, %conf ) = @_;