WWW::Velib::Station - Details of Velib' station bicycle and parking availability
This document describes version 0.01 of WWW::Velib::Station, released 2007-11-13.
use WWW::Velib::Station; my $s = WWW::Velib::Station->new(2007); print $s->available, $/; # hopefully a positive number
Create a WWW::Velib::Station object. A single input parameter is given, representing the station number.
Create a WWW::Velib::Station object, based on the geographic information provided by WWW::Velib::Map. Not expected to be called from client code.
Create a WWW::Velib::Station object, based on locally-cached contents of the geographic information provided by WWW::Velib::Map. Not expected to be called from client code.
Returns a two-element list containing the theta and phi coordinates of the station.
Returns the distance in metres of a station from the current station. The result is rounded by default to the nearest 5 metres.
my $depart; # two WWW::Velib::Station objects my $arrive; my $distance = $depart->distance_from($arrive);
To round off to another interval, specify the rounding as a second parameter:
my $dist_km = $depart->distance_from($arrive, 1000);
Returns the number (indentifier) of the station.
Indicates whether the station is open for business or not.
Returns the name of the station.
Returns the station's latitude, in degrees.
Returns the station's longitude, in degrees.
Returns the short address of the station.
Returns the full address of the station.
If a station has been built by loading a map, the following details will not be loaded (it takes time to fetch a couple of thousand web pages). This method will fetch the current status of the station (bikes available, slots available). On a long-running process, may be called repeatedly (at a suitable interval) to update the status.
Returns the number of bicycles available at the specified station.
Returns the total number of bicycle posts installed at the station.
Returns the number of bicycle posts that are able to receive a bicycle.
Returns the number of bicycle posts that are locked or have a locked bicycle attached.
David Landgren, copyright (C) 2007. All rights reserved.
http://www.landgren.net/perl/
If you (find a) use this module, I'd love to hear about it. If you want to be informed of updates, send me a note. You know my first name, you know my domain. Can you guess my e-mail address?
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::Velib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Velib
CPAN shell
perl -MCPAN -e shell install WWW::Velib
For more information on module installation, please visit the detailed CPAN module installation guide.