Group
Extension

Matches 4

Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API.pm ( view source; MetaCPAN )
package Catmandu::CA::API;

use strict;
use warnings;

use Catmandu::Sane;
use Moo;

use JSON;
use Catmandu::CA::API::QueryBuilder;
use Catmandu::CA::API::Request;

has username   => (is => 'ro', requ
  password  => $self->password,
        lang      => $self->lang
    );
    return $r->put(encode_json($data));
}

sub update {
    my ($self, $id, $data) = @_;
    my $r = Catmandu::CA::API::Request-
  password  => $self->password,
        lang      => $self->lang
    );
    return $r->put(encode_json($data));
}

sub delete {
    my ($self, $id) = @_;
    my $r = Catmandu::CA::API::Request->new(
 
Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API/Request.pm ( view source; MetaCPAN )
RSION = '0.06';

use strict;
use warnings;

use Moo;
use Catmandu::Sane;

use LWP::UserAgent;
use JSON;

use Catmandu::CA::API::Login;

has url       => (is => 'ro', required => 1);
has url_query => (
;
    my $response = $self->ua->get($url);
    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } elsif ($response->code == 404) {
        return {};
    } else
f->token);
    my $response = $self->ua->put($url, Content => $data, Content_type => 'application/json');

    if (!$response->is_success) {
        Catmandu::HTTPError->throw({
                code  
Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API/QueryBuilder.pm ( view source; MetaCPAN )
e JSON;

has field_list => (is => 'ro', required => 1);

has query => (is => 'lazy');

sub _build_query {
    my $self = shift;

    if (scalar @{$self->field_list} == 0) {
        return encode_json(
printf('%s', $field);
        $query->{'bundles'}->{$def} = {
            'returnAsArray' => JSON::true,
            'locale' => 'nl_BE'
        };
    }

    return encode_json($query);
}

1;
__END__
Catmandu-CA ( P/PI/PIETERDP/Catmandu-CA-0.06.tar.gz, PIETERDP, 2017; MetaCPAN )
Catmandu-CA/lib/Catmandu/CA/API/Login.pm ( view source; MetaCPAN )
Catmandu::Sane;

use Data::Dumper qw(Dumper);

use LWP::UserAgent;
use HTTP::Request::Common;
use JSON;

has username => (is => 'ro', required => 1);
has password => (is => 'ro', required => 1);
has u
nse = $self->ua->request($request);
    if ($response->is_success) {
        my $content = decode_json($response->decoded_content);
        return $content->{'authToken'};
    } else {
        Catmand

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