The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Transport::AU::PTV::Route - a route on the Victorian Public Transport Network.

VERSION

version 0.02

NAME

Transport::AU::PTV::Routes - a collection of Melbourne public transport routes (train, tram, bus, etc).

Synopsis

    # Get a single route from the list of all routes.
    my $route = Transport::AU::PTV->new({ ...})->routes->find({ id => 15 });
    my $route_name = $route->name;
    my $route_number = $route->number;

Description

This object represents a single route on the Public Transport Victoria network.

Methods

new

    my $route = Transport::AU::PTV::Route->( Transport::AU::PTV::APIRequest->new({ ... }, { route_id => 2 });

raw

The constructor for this object should not be called directly - instead the route should be accesses from the Transport::AU::PTV::Routes object.

id

Returns the ID of the route.

gtfs_id

    my $gtfs_id = $route->gtfs_id;

Returns the GTFS ID of the route.

number

    my $number = $route->number

Returns the number of the route.

name

    my $name = $route->name;

Returns the name of the route

type

    my $type = $route->type;

Returns the type of route.

stops

    my $stops = $route->stops;

Returns a Transport::AU::PTV::Stops collection object representing the stops on the route.

runs

    my $runs = $route->runs;

Returns a Transport::AU::PTV::Runs collection object representing the runs of the route.

AUTHOR

Greg Foletta <greg@foletta.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Greg Foletta.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.