use strict;
use warnings;
use 5.014;
use WebService::ForecastIo::Response;
use WebService::TFL::Bus;
use WebService::TFL::Bus::Request;
use WebService::TFL::TubeStatus;
use HomePanel::Render;
use Path::Class;
my $forecast = WebService::ForecastIo::Response->new(
file($ARGV[0])->slurp(iomode=>'<:raw')
);
my $bus = WebService::TFL::Bus->new()->request(
WebService::TFL::Bus::Request->new({
StopPointName => 'Hotspur Road',
ReturnList => [qw(StopID StopCode1 VisitNumber TripID VehicleID LineID LineName DirectionID DestinationText DestinationName EstimatedTime)],
}),
);
my $tube = WebService::TFL::TubeStatus->new()->request();
my $template = file(__FILE__)->parent->file('forecast.html.tt');
binmode STDOUT,':utf8';
print
HomePanel::Render->new({
template_file => $template,
forecast => $forecast,
bus => $bus,
tube => $tube,
})->render;