summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/VRR
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/VRR')
-rw-r--r--lib/Travel/Status/DE/VRR/Line.pm7
-rw-r--r--lib/Travel/Status/DE/VRR/Result.pm14
2 files changed, 20 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/VRR/Line.pm b/lib/Travel/Status/DE/VRR/Line.pm
index 9f7b228..5c12980 100644
--- a/lib/Travel/Status/DE/VRR/Line.pm
+++ b/lib/Travel/Status/DE/VRR/Line.pm
@@ -18,6 +18,13 @@ sub new {
return bless( $ref, $obj );
}
+
+sub TO_JSON {
+ my ($self) = @_;
+
+ return { %{$self} };
+}
+
1;
__END__
diff --git a/lib/Travel/Status/DE/VRR/Result.pm b/lib/Travel/Status/DE/VRR/Result.pm
index a6e294e..05f86d9 100644
--- a/lib/Travel/Status/DE/VRR/Result.pm
+++ b/lib/Travel/Status/DE/VRR/Result.pm
@@ -9,7 +9,7 @@ use parent 'Class::Accessor';
our $VERSION = '1.03';
Travel::Status::DE::VRR::Result->mk_ro_accessors(
- qw(countdown date delay destination info line lineref platform
+ qw(countdown date delay destination info key line lineref platform
platform_db sched_date sched_time time type)
);
@@ -20,6 +20,13 @@ sub new {
return bless( $ref, $obj );
}
+
+sub TO_JSON {
+ my ($self) = @_;
+
+ return { %{$self} };
+}
+
1;
__END__
@@ -86,6 +93,11 @@ an address were requested, this is the stop name, otherwise it may be recent
news related to the line's schedule. If no information is available, returns
an empty string.
+=item $departure->key
+
+Unknown. Appears to be the UUID for this departure (unique over all
+lines, reused daily).
+
=item $departure->line
The name/number of the line.