ey)->then(sub($result) {
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub($err) {
$self->render(json => { 'result' => 0, data => $err });
})->w
)->then(sub($result) {
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub($err) {
$self->render(json => { 'result' => 0, data => $err });
})->w
p()->then(sub($result) {
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub($err) {
$self->render(json => { 'result' => 0, data => $err });
})->w
ey)->then(sub($result) {
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub($err) {
$self->render(json => { 'result' => 0, data => $err });
})->w
ey)->then(sub($result) {
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub($err) {
$self->render(json => { 'result' => 0, data => $err });
})->w
t()->then(sub ($result){
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub ($err) {
$self->render(json => { 'result' => 0, data => $err });
});
ey)->then(sub($result) {
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub($err) {
$self->render(json => { 'result' => 0, data => $err });
})->w
ey)->then(sub($result) {
$self->render(json => { data => $result->{data}, result => => 1 });
})->catch(sub($err) {
$self->render(json => { 'result' => 0, data => $err });
})->w
package NVMPL::Remote;
use strict;
use warnings;
use feature 'say';
use HTTP::Tiny;
use JSON::PP qw(decode_json);
use File::Spec;
use NVMPL::Config;
use NVMPL::Utils qw(log_info log_warn log_error);
my $cachefile = File::Spec->catfile($install_dir, 'node_index_cache.json');
my $ttl = $cfg->{cache_ttl};
my $json_data;
my $use_cache = 0;
if (-f $cachefile) {
my $age =
!";
local $/;
$json_data = <$fh>;
close $fh;
}
}
unless ($use_cache) {
my $url = "$mirror/index.json";
log_info("Fetching remote ve
package NVMPL::Config;
use strict;
use warnings;
use JSON::PP qw(decode_json);
use File::Spec;
use File::HomeDir;
use File::Path qw(make_path);
# Default config locations
my $SYSTEM_CONF = '/etc/nvm-
---------------------------------------------------------------
# Internal helper: read and merge JSON or simple key=value config files
# --------------------------------------------------------------
;
local $/;
my $content = <$fh>;
close $fh;
my $data;
eval { $data = decode_json($content) };
if ($@) {
for my $line (split /\n/, $content) {
next if $lin
package NVMPL::Remote;
use strict;
use warnings;
use feature 'say';
use HTTP::Tiny;
use JSON::PP qw(decode_json);
use File::Spec;
use NVMPL::Config;
use NVMPL::Utils qw(log_info log_warn log_error);
my $cachefile = File::Spec->catfile($install_dir, 'node_index_cache.json');
my $ttl = $cfg->{cache_ttl};
my $json_data;
my $use_cache = 0;
if (-f $cachefile) {
my $age =
!";
local $/;
$json_data = <$fh>;
close $fh;
}
}
unless ($use_cache) {
my $url = "$mirror/index.json";
log_info("Fetching remote ve
'0.001';
use v5.38;
use Object::Pad;
use Mojo::UserAgent;
use Mojo::URL;
use Mojo::JSON qw(encode_json decode_json);
use Time::HiRes 'sleep';
use WebService::Akeneo::HTTPError;
class WebService::
s = { Accept=>'application/json', Authorization => 'Bearer ' . $auth->bearer };
my $tx;
if (exists $opt{ndjson}) {
my $records = $opt{ndjson} // [];
die 'ndjson must be arrayref' unless r
;
die 'ndjson array empty' unless @$records;
my $ndjson = join("", map { encode_json($_)."\n" } @$records);
$headers->{'Content-Type'} = 'application/vnd.akeneo.collection+json';
$tx =
ad) { $t->request('PATCH', "/products/$code", json => $payload) }
method upsert_ndjson ($records) { $t->request('PATCH', "/products", ndjson => $records) }
method list (%params)
cessfulResponseAsObjectAllOf;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
ionshipDefaultTlsCertificate;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
:Object::Serviceusagemetrics;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
hboardItemPropertyDataSource;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
sDnsRecordsRequestDnsRecords;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
::Object::MtdInvoiceResponse;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
yVisualizationPropertyConfig;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
ertificateDefaultCertificate;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
RecordsRequestDnsRecordsData;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{