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::Stop - a stop on the Victorian Public Transport Network.

VERSION

version 0.03

NAME

Transport::AU::PTV::Stop - a stop on the Victorian Public Transport Network.

METHODS

new

    # The 'stop' key in the constructor is the object returned by the API call.
    my $stop = Transport::AU::PTV::Stop->new( Transport::AU::PTV::APIRequest->new({...}), { route_id => 15, stop => { } );

name

    my $stop_name = $stop->name;

Returns the name of the stop.

type

    my $stop_type= $stop->type;

Returns the type of stop.

id

    my $stop_id = $stop->id;

Returns the stop ID.

route_id

    my $route_id = $stop->route_id;

Returns the route ID for the stop.

departures

    my $following_departures = $route->departures;
    my $next_departure = $route->departures({ max_results => 1 });

Returns a Transport::AU::PTV::Departures object representing the departures for the stop.

If no arguments are provided, returns all of the departures from the time of the request until the end of the day. Note: the API will not return the estimated departure time unless the max_results argument is provided.

  • max_results - Limits the number of results returned.

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.