From a88dea059bf92481556d2469ef157e545a3bb180 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 9 Jul 2022 23:10:56 +0200 Subject: Traewelling Pull: Only fetch most recent status This feature was recently added to Traewelling and should improve efficiency on all sides. --- lib/Travelynx/Helper/Traewelling.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Travelynx/Helper/Traewelling.pm b/lib/Travelynx/Helper/Traewelling.pm index bd0aa45..4d6c180 100644 --- a/lib/Travelynx/Helper/Traewelling.pm +++ b/lib/Travelynx/Helper/Traewelling.pm @@ -76,8 +76,8 @@ sub get_status_p { $self->{user_agent}->request_timeout(20) ->get_p( - "https://traewelling.de/api/v1/user/${username}/statuses" => $header ) - ->then( + "https://traewelling.de/api/v1/user/${username}/statuses?limit=1" => + $header )->then( sub { my ($tx) = @_; if ( my $err = $tx->error ) { -- cgit v1.2.3