=4 et si ai:
#
package WebService::IdoitAPI;
use 5.006;
use strict;
use warnings;
use Carp;
use JSON::RPC::Legacy::Client;
our $VERSION = '0.4.6'; # VERSION
my @CONFIG_VARS = qw(apikey password ur
ent}) {
$client = $self->{client};
}
else {
$client = new JSON::RPC::Legacy::Client;
$self->{client} = $client;
if ($self->{session_id})
die "Connection problem: $status_line";
}
die "JSON RPC client failed: $@";
}
$ret;
};
return $res;
}
my ($json,$jsontext,$query);
if (exists $config->{opt}->{file}
and my $fname = $config->{opt}->{file}) {
local $/ = undef;
if ($fname eq '-') {
$jsontext =
pen JSON query file '$fname': $!";
$jsontext = <$fh>;
close($fh);
}
}
else {
$jsontext = $ARGV[0];
}
$json = JSON->new();
$query = $json->de
code($jsontext);
return $query;
} # get_query();
sub initialize {
my $config = {};
my $opt = {};
GetOptions($opt, qw(
config|c=s
file|f=s
pretty!
help|
ft out
and the attributes in the other categories are changed
to values that can be used with the JSON-RPC-API call C<cmdb.category.save>.
One use case for this function
is to amend an object with da