Robin Clarke > WWW-EFA-0.04 > WWW::EFA

Download:
WWW-EFA-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.04   Source  

NAME ^

WWW::EFA - Interface to EFA sites (Elektronische Fahrplanauskunft)

VERSION ^

    Version 0.04

SYNOPSIS ^

Get location of public transport stops and connection details.

    use WWW::EFA;

    my $efa = WWW::EFA->new();
    ...

PARAMS/ACCESSORS ^

TODO: RCL 2012-01-22 document params/accessors

METHODS ^

departures

Queries the XSLT_DM_REQUEST method from the EFA server.

Params

location => WWW::EFA::Location (which must have the id (stopID) defined)

trips

Queries the XSLT_TRIP_REQUEST2 method from the EFA server.

Required Params

from => WWW::EFA::Location
to => WWW::EFA::Location
date => Class::Date of the time to be searched

Optional Params

via => WWW::EFA::Location (default undef)
is_departure => $boolean (set to true if the date is the departure time)
language => $string (language to return results in. Default 'de')
walk_speed => $number (override default walk speed.) TODO: RCL 2011-08-23 What is walk speed? km/h? m/s?

stop_finder

Queries the XML_STOPFINDER_REQUEST method from the EFA server.

Used to get an address from coordinates

Returns an ArrayRef of WWW::EFA::Location.

Usage

my $location = WWW::EFA::Location->new( coordinates => WWW::EFA::Coordinates->new( lat => 12.12345, lon => 48.12345, );

my( $address ) = $efa->stop_finder( location => $location, );

Params

location => WWW::EFA::Location

coord_request

Queries the XML_COORD_REQUEST method from the EFA server. Returns an array reference of WWW::EFA::Location objects.

Params

location => WWW::EFA::Location Must have either id or lon/lat defined
max_results => $integer Maximum number of results to return
max_distance => $integer Maximum distance (meters) around the given location to search

complete_location_from_anything

Give any valid combination from which a Location object may be completed (id, lat/lon, latitude/longitude, or location) and it will return a complete WWW::EFA::Location.

This can be handy in some contexts when you don't have a complete location object...

Params

id => $integer
lat / latitude => $number
lon / longitude => $number
location => WWW::EFA::Location

AUTHOR ^

Robin Clarke, <perl at robinclarke.net>

BUGS ^

Please report any bugs or feature requests to bug-www-efa at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-EFA. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

perldoc WWW::EFA

You can also look for information at:

ACKNOWLEDGEMENTS ^

LICENSE AND COPYRIGHT ^

Copyright 2011 Robin Clarke.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: