arnings;
use HTML::Entities qw(decode_entities);
use HTTP::Request::Common qw(GET);
use JSON qw(decode_json);
use LWP::UserAgent;
use Moo;
use MooX::StrictConstructor;
use URI;
use namespace::
or die $response->status_line, "\n";
my $json = decode_json( $response->decoded_content );
$json->{responseStatus} eq '200'
or die $json->{responseDetails}, "\n";
# Not clear
why decode_entities here.
# Looks like bad interface.
return decode_entities( $json->{responseData}->{translatedText} );
}
__PACKAGE__->meta->make_immutable;
1;
__END__
=head1