From fc9e97d0ef182489dd2bb029b20648a9182f2a90 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 12 Apr 2014 01:38:12 -0400 Subject: the progress stuff is not worthwhile the sync process takes less than a second --- lib/WWW/Pinboard.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/WWW/Pinboard.pm b/lib/WWW/Pinboard.pm index 585924d..ffa39b5 100644 --- a/lib/WWW/Pinboard.pm +++ b/lib/WWW/Pinboard.pm @@ -24,9 +24,7 @@ This module is a basic client for the L API. It currently provides methods for each API method in the C namespace (patches welcome to add support for more methods). Each method takes a hash of arguments, which correspond to the parameters documented in the API -documentation at L. They can also take an additional -parameter C, which will be passed to the C parameter -of the call to C on the L object. +documentation at L. =cut @@ -105,16 +103,12 @@ for my $method (qw(update add delete get recent dates all suggest)) { my $self = shift; my (%args) = @_; - my $progress = delete $args{progress}; - my $uri = $self->endpoint->clone; # XXX eventually support other parts of the api $uri->path($uri->path . 'posts/' . $method); $uri->query_form($uri->query_form, %args); - my $res = $self->ua->get( - $uri, { $progress ? (data_callback => $progress) : () } - ); + my $res = $self->ua->get($uri); die $res->{content} unless $res->{success}; return $self->json->decode($res->{content}); }); -- cgit v1.2.3-54-g00ecf