I::CardDetails'] );
sub _build_CardDetails { Business::eWAY::RapidAPI::CardDetails->new }
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
e MooX::Types::MooseLike::Base qw(:all);
has 'AccessCode' => ( is => 'rw', isa => Str );
sub TO_JSON { return { %{ $_[0] } }; }
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Business::e
use JSON;
use HTTP::Tiny;
use DateTime;
our $VERSION = '0.01';
has url => (
is => 'ro',
isa => 'Str|Undef',
default => 'https://ip-ranges.amazonaws.com/ip-ranges.json'
);
elf->url);
die "Error downloading URL" unless ($response->{ success });
return decode_json($response->{ content });
},
lazy => 1,
);
has sync_token => (
is => 'ro',
is
network information published by Amazon Web Services at https://ip-ranges.amazonaws.com/ip-ranges.json
Please read and understand the information can be found at http://docs.aws.amazon.com/general/la
our $VERSION = '0.04';
use Algorithm::ConsistentHash::JumpHash;
use Moose;
use JSON::XS qw(encode_json decode_json);
with 'ShardedKV::Continuum';
has '_orig_continuum_spec' => (
is => 'ro',
);
serialize {
my $self = shift;
encode_json( $self->_orig_continuum_spec )
}
sub deserialize {
my $class = shift;
return $class->new(from => decode_json( $_[1] ));
}
sub clone {
my $self = s
my $bundle = create_bundle('Example::Author::KENTNL');
$bundle->configure;
my @stopwords = (qw( JSON ));
for my $wordlist (@stopwords) {
$bundle->add_or_append_policy_field( 'Documentation::PodSpe
te qw/inflate/;
use IO::Uncompress::Bunzip2 qw/bunzip2/;
use List::Util qw/sum/;
use JSON::MaybeXS qw/decode_json/;
use UUID::Tiny qw/uuid_to_string/;
use constant HEADER_SPEC => [
[signature
at version' if $header{version} != 1;
read $fh, my $meta, $header{meta_length};
$meta = decode_json decompress $meta;
my %obj = (
%header,
fh => $fh,
meta => $meta,
index_format => ($head
rAgent::VERSION = '0.0301';
# ABSTRACT: (DEPRECATED) Use Selenium::UserAgent instead
use Moo;
use JSON;
use Cwd qw/abs_path/;
use Carp qw/croak/;
use Selenium::Remote::Driver::Firefox::Profile;
has
s/UserAgent\.pm$/devices.json/;
my $devices;
{
local $/ = undef;
open (my $fh, "<", $devices_file);
$devices = from_json(<$fh>);
close
fo on release
use Moose;
use HTTP::Tiny 0.050;
use MIME::Base64 3.14;
use JSON::MaybeXS 1.002006 qw( encode_json decode_json );
extends 'Dist::Zilla::Plugin::Bitbucket';
with 'Dist::Zilla::Role::Aft
c " . MIME::Base64::encode_base64("$login:$pass", '');
$headers->{'content-type'} = "application/json";
# We use the v1.0 API to update
my $url = 'https://bitbucket.org/api/1.0/repositories/' . $r
Bitbucket repository info" );
my $response = $http->request( 'PUT', $url, {
content => encode_json( $params ),
headers => $headers
});
if ( ! $response->{'success'} ) {
$self->log( ["Error:
=> 1;
use Try::Tiny qw/try catch/;
use Plack::Request;
use Params::Validate;
use JSON::XS qw/decode_json encode_json/;
use Convert::Base32 qw/encode_base32/;
use Net::OATH::Server::Lite::Error;
use
s ($request->method eq q{POST});
# content MUST be JSON
my $content = {};
eval {
$content = decode_json($request->content) if $request->content;
};
Content-Type" => "application/json;charset=UTF-8",
"Cache-Control" => "no-store",
"Pragma" => "no-cache" ],
[ encode_json($params) ]);
} catch {
e warnings;
use base qw(
ArangoDB2::Base
);
use Data::Dumper;
use JSON::XS;
use ArangoDB2::Graph::Vertex;
my $JSON = JSON::XS->new->utf8;
# create
#
# POST /_api/gharial/graph-name/vertex
s
->post(
$self->api_path('gharial', $self->graph->name, 'vertex'),
undef,
$JSON->encode({collection => $args->{name}}),
) or return;
# set name
$self->name($args->{n
:Lite::Error;
# default error
# HTTP/1.1 400 Bad Request
# Content-Type: application/json;charset=UTF-8
# Cache-Control: no-store
# Pragma: no-cache
#
# {
# "error":
->throw() if ...
# custom error
# HTTP/1.1 404 Not Found
# Content-Type: application/json;charset=UTF-8
# Cache-Control: no-store
# Pragma: no-cache
#
# {
# "error":
=> 1;
use Try::Tiny qw/try catch/;
use Plack::Request;
use Params::Validate;
use JSON::XS qw/decode_json encode_json/;
use Net::OATH::Server::Lite::Login;
use Net::OATH::Server::Lite::Error;
sub n
s ($request->method eq q{POST});
my $params;
eval {
$params = decode_json($request->content);
};
Net::OATH::Server::Lite::Error->throw() unless $params;
t-Type" => "application/json;charset=UTF-8",
"Cache-Control" => "no-store",
"Pragma" => "no-cache" ],
[ encode_json($response_params) ]);
ak |;
use Data::Dump qw| dump |;
use Encode qw| encode_utf8 |;
use IO::Handle;
use JSON::XS qw| decode_json |;
use Sys::Cmd qw| spawn |;
use Try::Tiny;
sub read_games {
my $pgn = shift;
xtract', '-s', '-Wjson', $pgn );
my $out = do { local $/; $proc->stdout->getline };
my @err = $proc->stderr->getlines;
if (@err) {
if ($err[0] =~ /Unknown output format json/) {
croak
r: pgn-extract has no '-Wjson' option");
}
STDERR->print ("pgn-extract: $_") for @err;
}
$proc->wait_child; # cleanup
# Ad-hoc hack for a problem in parsing JSON
#
# PGN files may c
nted REST clients
=head1 SYNOPSIS
package Your::API;
use base qw(Rest::Client::Builder);
use JSON;
sub new {
my ($class) = @_;
my $self;
$self = $class->SUPER::new({
on_request => sub
{
my ($self, $method, $path, $args) = @_;
return sprintf("%s %s %s\n", $method, $path, encode_json($args));
}
my $api = Your::API->new();
print $api->resource->get({ value => 1 });
# output:
ide any methods of any API object:
package Your::API;
use base qw(Rest::Client::Builder);
use JSON;
sub new {
my ($class) = @_;
my $self;
$self = $class->SUPER::new({
on_request => sub
ct;
use warnings;
use base qw(
ArangoDB2::Graph::Vertex
);
use Data::Dumper;
use JSON::XS;
my $JSON = JSON::XS->new->utf8;
# POST /_api/gharial/graph-name/edge/collection-name
sub create
{
ttp://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/> and
basicer at Bitbucket for
L<his work on JSON enhancement|https://bitbucket.org/basicer/pgn-extract/>.
=head1 LICENSE
Copyright (C) 2014 Mits
;
use base qw(
ArangoDB2::HTTP
);
use Data::Dumper;
use JSON::XS;
use LWP::UserAgent;
use Scalar::Util qw(weaken);
my $JSON = JSON::XS->new->utf8;
sub new
{
my($class, $arango) = @_;
_;
if ($response->is_success) {
my $res = eval { $JSON->decode($response->content) };
# if content is not valid JSON then return entire content
return $response->content u
package WebService::Bandcamp;
use JSON::XS;
use Cache::LRU;
use Net::DNS::Lite;
use Furl;
use URI;
use URI::QueryParam;
use Carp;
use Moo;
use namespace::clean;
our $VERSION = "0.06";
$Net::DNS::Lit
com',
path_query => "$path$query",
method => 'GET',
);
my $data = decode_json( $content );
if ( defined $data->{error} ) {
my $code = $data->{error};
my $m
package WebService::GigaTools;
use JSON::XS;
use Cache::LRU;
use Net::DNS::Lite;
use Furl;
use URI;
use URI::QueryParam;
use Carp;
use Moo;
use namespace::clean;
our $VERSION = "0.01";
$Net::DNS::Li
my $code = sub {
my ($self, %query_param) = @_;
return $self->request("$method.json", \%query_param);
};
no strict 'refs';
*{$method} = $code;
}
sub request {
my
path_query => "$path$query",
method => 'GET',
);
my $data = decode_json( $content );
if ( $status_code != 200 ) {
confess "Error";
} else {
retur
package WebService::MusixMatch;
use JSON::XS;
use Cache::LRU;
use Net::DNS::Lite;
use Furl;
use URI;
use URI::QueryParam;
use Carp;
use Moo;
use namespace::clean;
our $VERSION = "0.06";
$Net::DNS::L
RI->new;
$query->query_param( 'apikey', $self->api_key );
$query->query_param( 'format', 'json' );
map { $query->query_param( $_, $query_param->{$_} ) } keys %$query_param;
my ($minor
ath_query => "ws/1.1/$path$query",
method => 'GET',
);
my $data = decode_json( $content );
if ( $data->{message}{header}{status_code} != 200 ) {
confess $data->{me