Traewelling Pull: Only fetch most recent status

This feature was recently added to Traewelling and should improve
efficiency on all sides.
This commit is contained in:
Daniel Friesel 2022-07-09 23:10:56 +02:00
parent 40ff05aefe
commit a88dea059b
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005

View file

@ -76,8 +76,8 @@ sub get_status_p {
$self->{user_agent}->request_timeout(20) $self->{user_agent}->request_timeout(20)
->get_p( ->get_p(
"https://traewelling.de/api/v1/user/${username}/statuses" => $header ) "https://traewelling.de/api/v1/user/${username}/statuses?limit=1" =>
->then( $header )->then(
sub { sub {
my ($tx) = @_; my ($tx) = @_;
if ( my $err = $tx->error ) { if ( my $err = $tx->error ) {