NAME
Travel::Status::DE::EFA::Trip - Information about an individual public transit trip
SYNOPSIS
printf( "%s %s -> %s\n", $trip->type, $trip->line // q{}, $trip->dest_name );
for my $stop ( $trip->route ) {
...;
}
VERSION
version 3.09
DESCRIPTION
Travel::Status::DE::EFA::Trip describes a single trip / journey of a public transport line.
METHODS
ACCESSORS
Most accessors return undef if the corresponding data is not available.
- $trip->operator
-
Operator name.
- $trip->product
-
Product name.
- $trip->product_class
-
Product class.
- $trip->name
-
Trip or line name.
- $trip->line
-
Line identifier. Note that this is not necessarily numeric.
- $trip->number
-
Trip/journey number.
- $trip->type
-
Transport / vehicle type, e.g. "RE" or "Bus".
- $trip->id
-
Unique(?) trip ID
- $trip->dest_name
-
Name of the trip's destination stop
- $trip->dest_id
-
ID of the trip's destination stop
- $trip->route
-
List of Travel::Status::DE::EFA::Stop(3pm) objects describing the route of this trip.
Note: The EFA API requires a stop to be specified when requesting trip details. The stops returned by this accessor appear to be limited to stops after the requested stop; earlier ones may be missing.
- $journey->polyline(%opt)
-
List of geocoordinates that describe the trips's route. Each list entry is a hash with the following keys.
lon (longitude)
lat (latitude)
stop (Stop object for this location, if any. undef otherwise)
Note that stop is not provided by the backend and instead inferred by this module.
If the backend does not provide geocoordinates and this accessor was called with fallback set to a true value, it returns the list of stop coordinates instead. Otherwise, it returns an empty list.
INTERNAL
- $trip = Travel::Status::DE::EFA::Trip->new(%data)
-
Returns a new Travel::Status::DE::EFA::Trip object. You should not need to call this.
- $trip->TO_JSON
-
Allows the object data to be serialized to JSON.
DIAGNOSTICS
None.
DEPENDENCIES
BUGS AND LIMITATIONS
This module is a Work in Progress. Its API may change between minor versions.
SEE ALSO
Travel::Status::DE::EFA(3pm).
AUTHOR
Copyright (C) 2024-2025 Birte Kristina Friesel <derf@finalrewind.org>
LICENSE
This module is licensed under the same terms as Perl itself.