e warnings;
our $VERSION = '0.6.1'; # VERSION
use attributes;
use JSON::XS;
use Mojo::UserAgent;
use Data::Dumper;
use Mojo::JSON;
sub new {
my $that = shift;
my $proto = ref($that) || $t
$self->{endpoint};
}
sub get_plugins {
my ($self) = @_;
$self->_get("/plugins")->res->json;
}
sub auth {
my ( $self, $user, $pass ) = @_;
my ( $proto, $endpoint ) =
( $self-
elf->_ua->post( "$proto$user:$pass\@$endpoint/1.0/user/login",
json => {} )->res->json;
if ( $ref->{ok} == Mojo::JSON->true ) {
return $ref->{data};
}
return 0;
}
sub _u