hod;
{
$Net::HTTP::Spore::Meta::Method::VERSION = '0.05';
}
# ABSTRACT: create api method
use JSON;
use Moose;
use Moose::Util::TypeConstraints;
use MooseX::Types::Moose qw/Str Int ArrayRef HashR
=> qw(OPTIONS HEAD GET POST PUT DELETE TRACE);
subtype 'JSON::XS::Boolean' => as 'JSON::XS::Boolean';
subtype 'JSON::PP::Boolean' => as 'JSON::PP::Boolean';
subtype 'Boolean' => as Int =>
oolean'
=> from 'JSON::XS::Boolean'
=> via {
if ( JSON::is_bool($_) && $_ == JSON::true ) {
return 1
}
return 0;
}
=> from 'JSON::PP::Boolean'
=
p->evaluate_move_attempt($attempt);
return $result;
}
sub scorable{ #new? args? scorable_from_json?
my $self = shift;
my $scorable = Games::Go::Cinderblock::Scorable->new(
state => $se
VERSION
version 0.05
=head1 SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec('github.json');
$client->enable('Format::YAML');
=head1 DESCRIPTION
Net::HTTP::Spore::Middleware::Format
OPSIS
my $client = Net::HTTP::Spore->new_from_spec( 'google-url-shortener.json' );
$client->enable('Format::JSON');
$client->enable('Auth::OAuth',
oauth_consumer_key => '000000
server: irc.perl.org
nick: hlagherf32fr
The configuration file is in L<YAML|YAML> or L<JSON|JSON> format. It consists
of a hash containing C<global_plugins>, C<local_plugins>, C<networks>, C<
it as a micro-framework:
in app.psgi
use Plack::Request;
use Plack::ResponseHelper json => 'JSON',
text => 'Text';
my $app = sub {
my $env = shift
$form);
};
somewhere in your controllers
sub my_controller {
...
return json => {status => 'ok', data => [1, 2, 3]};
}
# or
sub dummy_controller {
return
s Plack's specifics.
Bundled with
L<Plack::ResponseHelper::Attachment>,
L<Plack::ResponseHelper::JSON>,
L<Plack::ResponseHelper::Redirect>,
L<Plack::ResponseHelper::Text>.
=head1 METHODS
=head2 use
VERSION
version 0.05
=head1 SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec('github.json');
$client->enable('Auth::Basic', username => 'xxx', password => 'yyy');
=head1 DESCRIPTION
VERSION
version 0.05
=head1 SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
$client->enable('Format::XML');
=head1 DESCRIPTION
Net::HTTP::Spore::Middleware::Format:
ilename => 'logfile'
)
);
my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
$client->enable( 'LogDispatch', logger => $log );
=head1 AUTHOR
franck cuny <franck@lumb
guments that could be used to initialize an identical delta.
B<Rulemap not included.>
Useful for JSON serialization.
=head1 TODO
=head2 time!
If states are given a timestamp, it would be <prudent
VERSION
version 0.09
=head1 SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
$client->enable('Format::Text');
=head1 DESCRIPTION
Net::HTTP::Spore::Middleware::Format
ad1 VERSION
version 0.09
=head1 SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec('api.json');
$client->enable(
'Auth::ApiKey',
api_key => 'apikey',
api_secret
=> 'text/plain'], 'ok');
}
};
my $client = Net::HTTP::Spore->new_from_spec('spec.json');
$client->enable('Mock', tests => $mock_server);
my $res = $client->my_rest_method();
but
less smart.
This is designed for general data validation. For example, it is useful for CSV, JSON, XML, and so on.
=head2 Concepts
=over
=item Natural as Perl code
I love C<Smart::Args> becau
VERSION
version 0.05
=head1 SYNOPSIS
my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
$client->enable('Runtime');
my $result = $client->public_timeline;
say "request e
oder::Google::V2;
use strict;
use warnings;
our $VERSION = '0.11_02';
use Carp;
use Encode;
use JSON;
use HTTP::Request;
use LWP::UserAgent;
use URI;
sub new {
my($class, %param) = @_;
my
URI->new("http://$self->{host}/maps/geo");
my %query_parameters = (q => $location, output => 'json');
$query_parameters{hl} = $self->{language} if defined $self->{language};
$query_paramet
croak("Google Maps API returned error: " . $res->status_line);
}
my $json = JSON->new->utf8;
my $data = $json->decode($res->content);
my @placemark = @{ $data->{Placemark} || [] };
_POSINT _HASH _HASHLIKE};
use JSON;
our $VERSION = '1.02';
sub new {
my ($class, $args) = @_;
my $self = bless($args, $class);
$self->{format} = 'json';
if ( $self->{secure} ==
;
}
sub decode {
my $self = shift;
my $json = JSON->new->allow_nonref;
if ( length $_[0] == 0 ) {
return {};
}
else {
return $json->decode( $_[0] );
}
}
sub account_system
uest = @_;
my $json_request = encode_json \%request;
my $results;
$self->{client}->POST($self->{protocol}.$self->{realm}."/api/v3/clients.".$self->{format}, $json_request);
$re
d, col_int, col_text, col_real FROM datatable', [qw{id col_int col_text col_real}] );
$c->render( json => $res );
=cut
sub new {
my $class = shift;
my $self = {};
$self = {@_};
die("Undefined
oder::Google::V3;
use strict;
use warnings;
our $VERSION = '0.11_02';
use Carp;
use Encode;
use JSON;
use HTTP::Request;
use LWP::UserAgent;
use URI;
sub new {
my($class, %param) = @_;
my
ode::encode_utf8($location);
}
my $uri = URI->new("http://$self->{host}/maps/api/geocode/json");
my %query_parameters = (address => $location);
$query_parameters{language} = $self->{l
croak("Google Maps API returned error: " . $res->status_line);
}
my $json = JSON->new->utf8;
my $data = $json->decode($res->content);
if ($data->{status} eq 'OVER_QUERY_LIMIT') {
hotspots
immutabilize
immutabilizes
immutabilized
inline
inlines
invocant
invocant's
irc
IRC
isa
JSON
login
namespace
namespaced
namespaces
namespacing
OO
OOP
ORM
overridable
parameterizable
paramete