Name : perl-WWW-Oxontime
| |
Version : 0.002
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 16:26:26
|
Group : Development/Libraries/Perl
| Source RPM : perl-WWW-Oxontime-0.002-lp155.1.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Live Oxford Bus Departures From Oxontime
|
Description :
This module wraps http://www.oxontime.com to provide live bus departures in Oxford.
Two methods can be exported (none by default):
* *stops_for_route*(_$route_id_)
Given a route ID (these can be obtained by inspecting the homepage of Oxontime), returns in list context a list of hashrefs having the keys \'stopName\' (name of stop) and \'stopId\' (ID of stop, suitable for passing to \'departures_for_stop\'). In scalar context, an arrayref containing this list is returned.
* *departures_for_stop*(_$stop_id_)
Given a stop ID (these can be obtained by inspecting the homepage of Oxontime or by calling \'stops_for_route\'), returns in list context a list of hashrefs having the keys \'service\' (name of service and company that runs it), \'destination\' (where the service is finishing) and \'departs\' (Time::Piece object representing the time when the service departs). In scalar context, an arrayref containing the list is returned.
Note that \'departs\' is in the time zone of Oxford, but Time::Piece interprets it as being in local time. If local time is different from time in Oxford, this needs to be taken into account.
* *nextbus_from_to*(_$from_, _$to_)
Given a place to start from and a place to arrive at this method returns a list of the next buses to serve that route. _$from_ must be one of the 8 provided constants:
NEXTBUS_FROM_HEADINGTON_CAMPUS NEXTBUS_FROM_HARCOURT_HILL NEXTBUS_FROM_MARSTON_ROAD NEXTBUS_FROM_WHEATLEY_CAMPUS NEXTBUS_FROM_CRESCENT_HALL NEXTBUS_FROM_PAUL_KENT_HALL NEXTBUS_FROM_SLADE_PARK NEXTBUS_FROM_CITY_CENTRE
whereas _$to_ is the name of an important station.
This function calls the Nextbus service at http://nextbus.brookes.ac.uk/. It is unclear what values for _$to_ are implemented by Nextbus; it is probably best to inspect the website to see what destinations are available.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-W/15.5/noarch |