refs are keyed
# unnecessarily by increment ID.
# This is actually in the raw JSON string...
my $args =
ref($_) eq 'ARRAY'
? $_->[0]
: $
e Moose;
use namespace::autoclean;
extends 'WebService::MyGengo::Base';
use HTTP::Response;
use JSON;
=head1 NAME
WebService::MyGengo::Response - An response from the myGengo API
=head1 DESCRIPTI
);
#=head2 _serializer
#
#A JSON object.
#
#B<Note:> The API also supports XML. We do not. :)
#
#=cut
has _serializer => (
is => 'ro'
, isa => 'JSON'
, init_arg => undef
=> 1
, builder => '_build__serializer'
);
sub _build__serializer {
return new JSON;
}
#=head2 _deserialized
#
#The deserialized response body.
#
#Returns undef if the body could n
};
use WebService::MyGengo::Exception;
use URI;
use Digest::HMAC;
use Digest::SHA1;
use JSON qw(encode_json);
=head1 NAME
WebService::MyGengo::RequestFactory - A factory for creating myGengo API
;
$req_params->{data} = encode_json($params);
my $request = HTTP::Request->new( $method => $uri );
$request->push_header( 'Accept' => 'application/json; charset=utf-8' );
$request->p
uest = HTTP::Request->new( $method => $uri );
$request->push_header( 'Accept' => 'application/json; charset=utf-8' );
return $request;
}
#=head2 _get_uri_and_req_params( $method, $endpoint )