t;
{
$WebService::Pocket::VERSION = '0.003';
}
use Data::Dumper;
use Moose;
use HTTP::Tiny;
use JSON;
use Try::Tiny;
use WebService::Pocket::Item;
# ABSTRACT: Client for the Pocket api (http://getp
=> 'Str' );
has ua => ( is => 'ro', default => sub { HTTP::Tiny->new } );
has json => ( is => 'ro', default => sub { JSON->new->canonical } );
has items => ( is => 'ro', default => sub { {} } );
has
ms = {};
$params->{$_} = $items->[$_] for ( 0 .. @$items - 1 );
$params = { new => $self->json->encode( $params ) };
$self->_send( $params );
# Get the new items
my $all_items =
) unless $new_title;
my $res = $self->pocket->_send({
update_title => $self->pocket->json->encode({
$self->item_id => {
url => $self->url,
titl
g() unless $new_tags;
my $res = $self->pocket->_send({
update_tags => $self->pocket->json->encode({
$self->item_id => {
url => $self->url,
tags
) unless defined $new_state;
my $res = $self->pocket->_send({
read => $self->pocket->json->encode({
$self->item_id => {
url => $self->url,
}
traits => [qw/NoGetopt/]
);
has "+$_" => ( traits => [qw/NoGetopt/] )
for qw/api_key base_url ua json items list_since/;
has "+$_" => (documentation => "Set $_. Can also be set in ~/.pocketrc")
for