Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix total_results of paged requests

  • Loading branch information...
commit 2203c6ff7f6b01d7618665844c3aa14558da9f56 1 parent e54acc5
@nwellnhof authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Net/Google/Analytics.pm
View
5 lib/Net/Google/Analytics.pm
@@ -156,7 +156,10 @@ sub retrieve_paged {
$start_index += $num_items;
}
- $res->items_per_page(scalar(@{ $res->rows }));
+ my $total_items = @{ $res->rows };
+ $res->items_per_page($total_items);
+ # The total result count of the first page isn't always accurate
+ $res->total_results($total_items);
return $res;
}
Please sign in to comment.
Something went wrong with that request. Please try again.