ABSTRACT: interact with Etherpad API
use Mojo::Base -base;
use Mojo::UserAgent;
use Mojo::JSON qw(decode_json);
use Mojo::IOLoop;
use Data::Dumper;
use Carp qw(carp);
has 'url';
has 'apikey';
has 'u
if ($res->is_success) {
# Can’t use $res->json when json is too large
my $json = decode_json($res->body);
if ($json->{code} == 0) {
return 1 if $args->{boolea
key}) {
$data = (ref($json->{data}) eq 'HASH') ? $json->{data}->{$args->{key}} : $json->{data};
} else {
$data = $json->{data};
}
r