Group
Extension

Matches 2

WebService-PutIo ( M/MR/MRAMBERG/WebService-PutIo-0.3.tar.gz, MRAMBERG, 2011; MetaCPAN )
WebService-PutIo/lib/WebService/PutIo.pm ( view source; MetaCPAN )
::JSON;
use Mojo::URL;
use WebService::PutIo::Result;
use Carp qw/croak/;

__PACKAGE__->attr([qw/api_key api_secret/]);
__PACKAGE__->attr(ua => sub { Mojo::UserAgent->new; });
__PACKAGE__->attr(json =
> sub { Mojo::JSON->new; });

sub request {
	my ($self,$class,$method,%params)=@_;
	croak "Must set api_key and api_secret" unless $self->api_key && $self->api_secret;
	$params ||= ();
	my $data={
		a
od")
				     ->query(method=>$method);
	my $tx=$self->ua->post_form( $url => { request => $self->json->encode($data) } );
	if (my $res=$tx->success) {
		return WebService::PutIo::Result->new( respons
WebService-PutIo ( M/MR/MRAMBERG/WebService-PutIo-0.3.tar.gz, MRAMBERG, 2011; MetaCPAN )
WebService-PutIo/lib/WebService/PutIo/Result.pm ( view source; MetaCPAN )
/;

use Mojo::JSON;
use Carp qw/croak/;

__PACKAGE__->attr(qw/response/);
__PACKAGE__->attr('json' => sub { Mojo::JSON->new });
__PACKAGE__->attr( data => sub { my $self=shift;$self->json->decode($sel
representing the response from put.io

=head2 json 

JSON object for deserializing. Defaults to a plain L<Mojo::JSON>.


=head2 data

The deserialized JSON body.

=head1 METHODS

=head2 count

Number 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.