Peter H. Li > WebService-Nextbus-Agency > WebService::Nextbus::Agency::SFMUNI

Download:
WebService-Nextbus-Agency-0.12.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.12   Source  

NAME ^

WebService::Nextbus::Agency::SFMUNI - A helper subclass of WebService::Nextbus::Agency for the sf-muni agency

SYNOPSIS ^

        use WebService::Nextbus::Agency::SFMUNI;
        $muniAgency = new WebService::Nextbus::Agency::SFMUNI;
        @stopCodes = $muniAgency->str2stopCodes('N', 'judah', 'Duboce and Fillmore');

$stopCodes can now be used as valid GET arguments on the nextbus webpage.

DESCRIPTION ^

Objects of the SFMUNI class are WebService::Nextbus::Agency inheritors and already know much of the data about sf-muni, e.g. available routes, stops, etc..

WebService::Nextbus::Agency is a class used as a data structure to store and intelligently recall the information that WebService::Nextbus will download from the Nextbus website. It class can also be used by initializing inheriting helper subclasses such as SFMUNI, which will automatically load up the data relevant for the given agency without having to go to the web.

The "SYNOPSIS" indicates how the object can be used to retrieve the GET argument that the website requires for returning GPS information for a particular stop on a particular route of the sf-muni agency. Once the proper GET code has been retrieved, a web useragent can use the argument to build a URL for the desired information. This is another function that will eventually be provided by WebService::Nextbus.

EXPORT

None by default.

ERROR CHECKING ^

Watch out! No error checking yet...

REQUIRES ^

Started using serialized data via Storable for storing and retrieving the prepared agency data.

Requires and packaged with WebService::Nextbus::Agency.

Tests (packages with Agency) require Test::More.

AUTHOR ^

Peter H. Li<lt>phli@cpan.org<gt>

COPYRIGHT ^

Licensed by Creative Commons http://creativecommons.org/licenses/by-nc-sa/2.0/

SEE ALSO ^

WebService::Nextbus::Agency, Storable, perl.

syntax highlighting: