Group
Extension

Matches 3

Ambassador-API-V2 ( D/DR/DREAMHOST/Ambassador-API-V2-0.001.tar.gz, DREAMHOST, 2016; MetaCPAN )
Ambassador-API-V2/lib/Ambassador/API/V2.pm ( view source; MetaCPAN )
package Ambassador::API::V2;

use Moo;
use v5.10;

with 'Ambassador::API::V2::Role::HasJSON';
use HTTP::Tiny;
use URI;
use Ambassador::API::V2::Error;
use Ambassador::API::V2::Result;

our $VERSION = 
  => "Ambassador-API-V2/$VERSION",
            default_headers => {'Content-Type' => 'application/json'}
        );
    }
);

sub _make_url {
    my $self   = shift;
    my $method = shift;

    my $u
 sensitive to double slashes.
    my $path = $url->path . join '/', $self->username, $self->key, 'json', $method;
    $path =~ s{/{2,}}{/}g;

    $url->path($path);

    return $url;
}

sub _handle_re
Ambassador-API-V2 ( D/DR/DREAMHOST/Ambassador-API-V2-0.001.tar.gz, DREAMHOST, 2016; MetaCPAN )
Ambassador-API-V2/lib/Ambassador/API/V2/Role/Response.pm ( view source; MetaCPAN )
onse;

use Moo::Role;
use Carp;
use Types::Standard ":types";
with 'Ambassador::API::V2::Role::HasJSON';

our $VERSION = '0.001';

has http_response => (
    is       => 'ro',
    isa      => HashRef,
  required => 1,
);

sub _build_response {
    my $self = shift;

    my $content = eval { $self->json->decode($self->http_response->{content}); };
    croak "Failed to decode @{[ $self->http_response
Ambassador-API-V2 ( D/DR/DREAMHOST/Ambassador-API-V2-0.001.tar.gz, DREAMHOST, 2016; MetaCPAN )
Ambassador-API-V2/lib/Ambassador/API/V2/Role/HasJSON.pm ( view source; MetaCPAN )
:Role::HasJSON;

use Moo::Role;
use JSON::MaybeXS;

our $VERSION = '0.001';

# Configure and cache the JSON object
has json => (
    is      => 'ro',
    default => sub {
        return JSON->new->utf
::API::V2::Role::HasJSON - Adds a json attribute with a JSON::MaybeXS
object

=head1 DESCRIPTION

Role for objects with JSON.

=head1 ATTRIBUTES

=over 4

=item json

Returns a JSON::MaybeXS object.


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