Group
Extension

Matches 5

cPanel-APIClient ( C/CP/CPANEL/cPanel-APIClient-0.10.tar.gz, CPANEL, 2022; MetaCPAN )
cPanel-APIClient/lib/cPanel/APIClient/Utils/JSON.pm ( view source; MetaCPAN )
package cPanel::APIClient::Utils::JSON;

# Copyright 2020 cPanel, L. L. C.
# All rights reserved.
# http://cpanel.net
#
# This is free software; you can redistribute it and/or modify it under the
# sa
erl itself. See L<perlartistic>.

use strict;
use warnings;

use JSON ();

my $json;

sub _json {
    return $json ||= JSON->new()->utf8(0);
}

sub decode {
    return _json()->decode( $_[0] );
}

1;
cPanel-APIClient ( C/CP/CPANEL/cPanel-APIClient-0.10.tar.gz, CPANEL, 2022; MetaCPAN )
cPanel-APIClient/lib/cPanel/APIClient/Request/WHM1.pm ( view source; MetaCPAN )
 warnings;

use parent qw( cPanel::APIClient::Request::HTTPBase );

use cPanel::APIClient::Utils::JSON    ();
use cPanel::APIClient::Response::WHM1 ();

sub HTTP_RESPONSE_CLASS { return 'cPanel::APICl
 bless [ $func, $args_hr ], $class;
}

sub get_http_url_path {
    my ($self) = @_;

    return "/json-api/$self->[0]";
}

sub get_http_payload {
    my ($self) = @_;

    local $self->[1]{'api.versio
lient::Utils::CLIRequest;
    return (
        '/usr/local/cpanel/bin/whmapi1',
        '--output=json',
        ( $username ? "--user=$username" : () ),
        $self->[0],
        cPanel::APIClient:
cPanel-APIClient ( C/CP/CPANEL/cPanel-APIClient-0.10.tar.gz, CPANEL, 2022; MetaCPAN )
cPanel-APIClient/lib/cPanel/APIClient/Request/UAPIFromWHM1.pm ( view source; MetaCPAN )

use warnings;

use parent qw( cPanel::APIClient::Request::WHM1 );

use cPanel::APIClient::Utils::JSON    ();
use cPanel::APIClient::Response::UAPI ();

sub HTTP_RESPONSE_CLASS { return 'cPanel::APICl


    my %args = (
        cpanel_jsonapi_apiversion => 3,
        cpanel_jsonapi_module     => $module,
        cpanel_jsonapi_func       => $fn,
        cpanel_jsonapi_user       => $cpusername,
   
cPanel-APIClient ( C/CP/CPANEL/cPanel-APIClient-0.10.tar.gz, CPANEL, 2022; MetaCPAN )
cPanel-APIClient/lib/cPanel/APIClient/Request/UAPI.pm ( view source; MetaCPAN )
 warnings;

use parent qw( cPanel::APIClient::Request::HTTPBase );

use cPanel::APIClient::Utils::JSON    ();
use cPanel::APIClient::Response::UAPI ();

sub HTTP_RESPONSE_CLASS { return 'cPanel::APICl
PIClient::Utils::CLIRequest;
    return (
        '/usr/local/cpanel/bin/uapi',
        '--output=json',
        ( $username ? "--user=$username" : () ),
        @{$self}[ 0, 1 ],
        cPanel::APIC
li_response {
    my ( $self, $resp_body ) = @_;

    my $resp_struct = cPanel::APIClient::Utils::JSON::decode($resp_body);
    $resp_struct = $resp_struct->{'result'};

    return cPanel::APIClient::
cPanel-APIClient ( C/CP/CPANEL/cPanel-APIClient-0.10.tar.gz, CPANEL, 2022; MetaCPAN )
cPanel-APIClient/lib/cPanel/APIClient/Request/HTTPBase.pm ( view source; MetaCPAN )
ms as Perl itself. See L<perlartistic>.

use strict;
use warnings;

use cPanel::APIClient::Utils::JSON ();
use cPanel::APIClient::X           ();

sub get_http_method {
    return 'POST';
}

sub get_h
resp_obj->as_string() . $/ . $resp_body );
    }

    my $resp_struct = cPanel::APIClient::Utils::JSON::decode($resp_body);

    return $self->HTTP_RESPONSE_CLASS()->new(
        $self->_EXTRACT_RESPO

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.