WebService::Nextbus::Agency::SFMUNI - A helper subclass of WebService::Nextbus::Agency for the sf-muni agency
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.
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.
None by default.
Watch out! No error checking yet...
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.
Peter H. Li<lt>firstname.lastname@example.org<gt>
Licensed by Creative Commons http://creativecommons.org/licenses/by-nc-sa/2.0/