{
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/users/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item get_badges
my $res = $tp->us
y $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/users/%s/badges.json', @args;
$api->base->call("GET", $uri, @_);
}
sub badges {
my $self = shift;
Carp::
hift;
my @args;
push @args, shift; # id
my $uri = sprintf '/users/%s/badges/@learning.json', @args;
$api->base->call("GET", $uri, @_);
}
sub learning_badges {
my $self = shift;
rgs, shift; # [% param %]
[% END -%]
my $uri = sprintf '/[% path_format(method.pathChunks) %].json', @args;
$api->base->call("[% method.httpMethod %]", $uri, @_);
}
[% IF canonical != mangled
y $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/applications/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item get_badges
my $res = $tp->ap
= shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/applications/%s/badges.json', @args;
$api->base->call("GET", $uri, @_);
}
sub badges {
my $self = shift;
Carp::
my @args;
push @args, shift; # id
my $uri = sprintf '/applications/%s/badges/@learning.json', @args;
$api->base->call("GET", $uri, @_);
}
sub learning_badges {
my $self = shift;
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/events/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=back
=cut
### END auto-generated
1;
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/favorites/%s.json', @args;
$api->base->call("DELETE", $uri, @_);
}
=pod
=item get
my $res = $tp->favori
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/favorites/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=back
=cut
### END auto-generated
1;
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/badges/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=back
=cut
### END auto-generated
1;
am.
=back
=cut
sub search {
my $api = shift;
my @args;
my $uri = sprintf '/assets.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item delete
my $res = $tp->assets
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/assets/%s.json', @args;
$api->base->call("DELETE", $uri, @_);
}
=pod
=item get
my $res = $tp->assets
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/assets/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item put
my $res = $tp->assets->p
use Moose;
our $VERSION = '1.0000'; # VERSION
#use Data::Dump;
use HTTP::Request;
use JSON qw(to_json from_json);
use LWP::UserAgent;
use Parallel::ForkManager;
has email => ( is => 'ro', isa =>
$self->email, $self->password);
$agent->default_header(Accept => 'application/json');
return $agent;
},
handles => [qw(get request)],
);
has base_uri => (
is =
_;
my ($response, $data);
#$response = $self->agent->get($self->base_uri);
#dd from_json $response->content;
#exit;
#$response = $self->agent->get($data->{versions}[0]);
$re
g and receiving JSON arrays encoded as
UTF-8. The server expects JSON arrays to be sent back-to-back, without any
separators, but for testing purposes it is often convenient to end JSON
arrays with AS
protocol.
To support programming languages without incremental JSON parsers,
the server will append an ASCII LF character to each JSON array and
additionally will make sure that its replies will nev
in any ASCII
LF characters, so instead of directly parsing the JSON stream, the client
may also read single lines and then decode the JSON array contained in
each line.
Note 1: This means that one ca
h end devices are connected to which switch ports on which
switches and routers. It also offers a JSON-based client API, for which
this module is an implementation.
In addition to Porttracker, the Po
();
use AnyEvent ();
use AnyEvent::Handle ();
use MIME::Base64 ();
use Digest::HMAC_MD6 ();
use JSON ();
our $VERSION = '1.01';
sub call {
my ($self, $type, @args) = @_;
$self->{$type}
=> sub {
while ($_[0]{rbuf} =~ s/^([^\x0a]*)\x0a//) {
my $msg = JSON::decode_json $1;
my $id = shift @$msg;
if (defined $id) {
al $ENV{'PERL5LIB'} = undef;
local $ENV{'PERL_YAML_BACKEND'} = undef;
local $ENV{'PERL_JSON_BACKEND'} = undef;
local $ENV{'PATH'} = $self->get_path_string() . q{;} . join q{;}, @keep;
$s
:Filters> - Common methods for filtering HTTP request parameters.
L<Apache2::WebApp::Plugin::JSON> - JSON module wrapper.
L<Apache2::WebApp::Plugin::Mail> - Methods for sending template based multi-
' => (is => 'ro', isa => 'Maybe[Object]', default => 'JSON::false');
has 'email_confirmed' => (is => 'ro', isa => 'Maybe[Object]', default => 'JSON::false');
sub _build_display_name {
my $self =
', default => 'JSON::false');
has 'is_fan' => (is => 'ro', isa => 'Maybe[Object]', default => 'JSON::false');
has 'is_following' => (is => 'ro', isa => 'Maybe[Object]', default => 'JSON::false');
no
;
has _request => (isa => 'Net::OAuth::Request', is => 'rw');
has json_parser => (isa => 'JSON::Any', is => 'ro', default => sub {JSON::Any->new()});
=head1 NAME
Net::Plurk::OAuth
=head1 SYNOPSIS
er->{Reason});
$self->_errorcode($header->{Status});
}
$data = $self->json_parser->from_json($data);
$w->send;
}
);
$w->recv;
return wantarray ? ($da
f ArrayRef ClassName Object Str /;
use MooseX::Types::Common::String qw/ NonEmptySimpleStr /;
use JSON::XS ();
use CatalystX::OAuth2::Provider::Error;
use namespace::autoclean;
BEGIN { extends 'Catal
rant_type',
error_description => 'Invalid grant type');
$ctx->res->body( JSON::XS->new->pretty(1)->encode( \%data ) );
}
sub handle_grant_type : Private {
my ( $self, $ct
st, 'Compress::unLZMA';
}
push @modules_list, qw{
Win32::UTCFileTime
CPAN::Meta::YAML
JSON::PP
Parse::CPAN::Meta
YAML
Net::FTP
Digest::MD5
Digest::SHA1
Digest::SHA
Mod
Support scope
refresh_token => $ctx->session->{token} );
$ctx->res->body( JSON::XS->new->pretty(1)->encode( \%data ) );
$ctx->detach();
}
};
=pod
=cut
1;
package Net::Plurk;
use feature ':5.10';
use Moose;
use URI;
use JSON::Any;
use AnyEvent::HTTP;
use Net::Plurk::UserProfile;
use Net::Plurk::OAuth;
use DateTime;
use Data::Dumper;
use namespace::auto
{
my $plurk = shift;
# blah
},
);
$p->listen;
my $json = $p->callAPI( '/api');
...
=head1 EXPORT
A list of functions that can be exported. You ca
file {
my ($self, $user) = @_;
my $json_data = $self->callAPI(
'/Profile/getPublicProfile',
user_id => $user,
);
return $json_data if $self->raw_output;
$self->publ
orage;
extends 'Graphics::Primitive::Component';
with 'MooseX::Clone';
with Storage (format => 'JSON', io => 'File');
use Graphics::Primitive::Path;
has path => (
isa => 'Graphics::Primitive::