From 6ff22eb547a639c90f10fad05ee76d75ab8a31b9 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 13 May 2013 19:23:37 +0100 Subject: get some bus info --- bus.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bus.pl diff --git a/bus.pl b/bus.pl new file mode 100644 index 0000000..ba82c4b --- /dev/null +++ b/bus.pl @@ -0,0 +1,17 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.014; +use LWP::Simple; +use URI; +use URI::QueryParam; + +my $base = URI->new('http://countdown.api.tfl.gov.uk/interfaces/ura/instant_V1'); + +$base->query_form({ + StopPointName => 'Hotspur Road', + #Towards => 'Islip Manor', + ReturnList => 'StopID,StopCode1,VisitNumber,TripID,VehicleID,LineID,LineName,DirectionID,DestinationText,DestinationName,EstimatedTime', +}); + +say get($base); -- cgit v1.2.3