The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::Nextbus::Agency - Superclass for data structures designed for Nextbus website (www.nextbus.com)

SYNOPSIS

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

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

DESCRIPTION

WebService::Nextbus::Agency is conceived as a class of object used by WebService::Nextbus 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 classes that will automatically load up the data relevant for the given agency.

However, the WebService::Nextbus package is not released yet, so the functionality of WebService::Nextbus::Agency is currently limited to the second method. Further, the only helper inheriting class I've written thus far is the class for the San Francisco MUNI agency (sf-muni). This subclass is available as WebService::Nextbus::Agency::SFMUNI.

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 by making WebService::Nextbus an LWP::UserAgent.

EXPORT

None by default.

ERROR CHECKING

Watch out! No error checking yet...

REQUIRES

None.

AUTHOR

Peter H. Li<lt>pli9+CODE@spam-guard.itsa.ucsf.edu<gt>

COPYRIGHT

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

SEE ALSO

WebService::Nextbus::Agency::SFMUNI, perl.