summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/work.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Command/work.pm')
-rw-r--r--lib/Travelynx/Command/work.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm
index 727a694..9c870d8 100644
--- a/lib/Travelynx/Command/work.pm
+++ b/lib/Travelynx/Command/work.pm
@@ -35,7 +35,11 @@ sub run {
eval {
if ( $now->epoch - $entry->{real_dep_ts} < 900 ) {
- my $status = $self->app->get_departures( $dep, 30, 30 );
+ my $status = $self->app->iris->get_departures(
+ station => $dep,
+ lookbehind => 30,
+ lookahead => 30
+ );
if ( $status->{errstr} ) {
die("get_departures($dep): $status->{errstr}\n");
}
@@ -123,7 +127,11 @@ sub run {
or $now->epoch - $entry->{real_arr_ts} < 600 )
)
{
- my $status = $self->app->get_departures( $arr, 20, 220 );
+ my $status = $self->app->iris->get_departures(
+ station => $arr,
+ lookbehind => 20,
+ lookahead => 220
+ );
if ( $status->{errstr} ) {
die("get_departures($arr): $status->{errstr}\n");
}