%{$res->json})
: Finance::Robinhood::Error->new(
$res->is_server_error ? (details => $res->message) : $res->json);
}
sub _test_instrument {
t::U
ox for all arguments passed to them. A method proxy is
an array ref which is lightly inspired by JSON references. This array
ref must have the string C<&proxy> as the first value, a package name
as
od::User->new(_rh => $s->_rh, %{$res->json})
: Finance::Robinhood::Error->new(
$res->is_server_error ? (details => $res->message) : $res->json);
}
sub _test_user {
t::Utility
s_success
? $res->json->{can_downgrade_to_cash}
: Finance::Robinhood::Error->new(
$res->is_server_error ? (details => $res->message) : $res->json);
}
sub _test_can_downgr
h
= t::Utility::stash('ACCT')->can_downgrade_to_cash;
isa_ok($can_downgrade_to_cash, 'JSON::PP::Boolean');
}
=head2 C<instant_eligibility( )>
Returns the related Finance::Robinhood::Equi
es->json)
if !$res->is_success;
}
return $res->is_success ||
Finance::Robinhood::Error->new(
$res->is_server_error ? (details => $res->message) : $res->json);
%{$res->json})
: Finance::Robinhood::Error->new(
$res->is_server_error ? (details => $res->message) : $res->json);
}
sub _test_add_instrument {
, uuids => join ',', @ids);
return $res->is_success || Finance::Robinhood::Error->new(%{$res->json});
}
sub _test_reorder {
t::Utility::stash('WATCHLIST') // skip_all();
t::Utility::stash
::FreeIPA::Request;
# cannout use 'use Types::Serialiser'; it is incompatible with JSON::XS 2.X (eg on EL6)
use JSON::XS;
use Readonly;
use base qw(Exporter);
our @EXPORT_OK = qw(process_args);
#
l;}, # Force internal conversion to float
bool => sub {my $val = shift; return $val ? JSON::XS::true : JSON::XS::false;},
};
# Aliases for each dispatch
Readonly::Hash my %CONVERT_ALIAS => {
_rh => $s->_rh,
%{$s->_rh->_get($s->{instrument})->json}
);
}
=head1 LEGAL
This is a simple wrapper around the API used in the official apps. The a
warning_message);
our $VERSION = '0.8';
use Moose::Role;
use JIRA::REST ();
use JSON::XS qw(encode_json decode_json);
use Path::Class;
use Try::Tiny;
use Unicode::Normalize ();
has 'jira_client' =
teTime->dmy . ' ' .
DateTime->hms). This is to make it easy to pass the data structure into YAML,
JSON, MySQL, etc. Nevertheless, internally DateTime objects are still used.
=back
Additional notes:
vice::Pixela::Graph;
use WebService::Pixela::Pixel;
use WebService::Pixela::Webhook;
use URI;
use JSON;
use Class::Accessor::Lite(
new => 0,
ro => [qw/
user
graph
pixe
sub _decode_or_simple_return_from_json {
my ($self,$rev_json) = @_;
unless ($self->decode){
return $rev_json;
}
return decode_json($rev_json);
}
sub _request {
my ($self
ase_url);
my $receive_json = $self->_agent->request($method, $uri->as_string, $params)->{"content"};
return $self->_decode_or_simple_return_from_json($receive_json);
}
sub query_request {
e qw/clone/;
use Cpanel::JSON::XS;
use Data::Dumper;
use Disbatch;
use Exporter qw/ import /;
use File::Slurp;
use Limper::SendFile; # needed for public()
use Limper::SendJSON;
use Limper 0.015;
use M
arams_mixed/;
our @EXPORT = qw/ parse_params send_json_options template /;
my $oid_keys = [ qw/ queue / ]; # NOTE: in addition to _id
sub send_json_options { allow_blessed => 1, canonical => 1, con
atch->new(class => 'Disbatch::Web', config_file => ($args->{config_file} // '/etc/disbatch/config.json'));
$disbatch->load_config;
public ($disbatch->{config}{web_root} // '/etc/disbatch/htdoc
thorize';
has access_token_url => 'https://api.twitter.com/oauth/access_token';
has user_info_url => 'https://api.twitter.com/1.1/account/verify_credentials.json';
sub moniker { 'twitter' }
1;
on't want to write multiple lines. This helps
connect L<Test::DNS> with freshly-parsed data (YAML/JSON/XML/etc.).
use Test::DNS;
use YAML 'LoadFile';
use Test::More tests => 2;
my $d
https://foo.baz.net/etc',
headers => [
'Content-Type' => 'application/json',
],
content => encode_json {
type => 'dog',
breed => 'chihuahua',
},
);
=head1 DESCRIPT
3';
use 5.12.0;
use warnings;
use Disbatch::Web; # exports: parse_params send_json_options template
use Limper::SendJSON;
use Limper;
use MongoDB::OID 1.0.4;
use Safe::Isa;
use Time::Moment;
use Try:
options} eq 'HASH') {
status 400;
return send_json { error => 'filter and options must be name/value objects' }, send_json_options;
}
$params->{options}{limit} //= $LIMIT;
s->{options}{limit} > $LIMIT) {
status 400;
return send_json { error => "limit cannot exceed $LIMIT" }, send_json_options;
}
$params->{filter}{queue} = { '$oid' => $params->{f
In case the api_url was updated.
$self->server($self->api_url);
$self->type(q|application/json|);
my $endpoint = q||;
$endpoint .= qq|/$resource|;
$endpoint .= qq|/$id_or_name| if
in::AutoSecrets::VERSION = '0.006';
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::JSON qw(encode_json decode_json);
use Session::Token;
use Carp qw(croak);
use Fcntl qw(:DEFAULT :flock);
use IO::Fi
}
croak "Can't read from $path: $!"
if !defined $rv;
my $disk_secrets = $disk && decode_json($disk);
unshift @secrets, @$disk_secrets
if $disk_secrets;
if (!@secrets || -z $path ||
- 1]
if $prune && @secrets > $prune;
$fh->seek(0, 0);
$fh->syswrite(my $j = encode_json(\@secrets));
}
flock $fh, LOCK_UN;
$fh->close;
push @secrets, @{$app->{secrets}}
if
;
use Graph::Directed;
use List::AllUtils qw/ uniq first_value /;
use JSON;
my %tasks = map { $_->{uuid} => $_ } @{ from_json `task +PENDING export` };
my $graph = Graph::Directed->new;
$graph->a
areDir 'dist_dir';
use BenchmarkAnything::Storage::Frontend::Lib;
use Template;
use JSON 'decode_json', 'encode_json';
with 'MooseX::Getopt::Usage',
'MooseX::Getopt::Usage::Role::Man';
has 'subdir'
LTMATRIX, $options) = @_;
require JSON;
my $outfile = $options->{outfile};
my $vars = {
RESULTMATRIX => JSON->new->pretty->encode($RESULTMATRIX),
$chartlist, $options) = @_;
require JSON;
my $number = 0;
my @extended_chartlist = map
{
$_->{json} = JSON->new->pretty->encode($_->{data});
Disbatch;
$Disbatch::VERSION = '4.103';
use 5.12.0;
use warnings;
use boolean 0.25;
use Cpanel::JSON::XS;
use Data::Dumper;
use Encode;
use File::Slurp;
use Log::Log4perl;
use MongoDB 1.0.4;
use POS
lf) = @_;
if (!defined $self->{config}) {
$self->{config} = try {
Cpanel::JSON::XS->new->utf8->relaxed->decode(scalar read_file($self->{config_file}));
} catch {
ave any of these, but plugins can easily be created for
them:
from_dumper to_dumper
from_json to_json
from_yaml to_yaml
from_xml to_xml
=head2 Boolean
Limper does not define B<true> or B<fa