ental qw( class );
package WWW::PiHole;
class WWW::PiHole {
use URI;
use HTTP::Tiny;
use JSON::PP;
use Syntax::Operator::In;
use Term::ANSIColor;
# @formatter:off
field $auth :param
y $http = HTTP::Tiny -> new;
my $json = JSON::PP -> new;
method _content ( ) {
$http -> get( $uri ) -> {content};
}
method _content_json ( ) {
$json -> decode( $self -> _content ); #
$self -> _content_json -> {status};
}
method _list ( $uri ) {
my $json_body = $self -> _content_json;
if ( $json_body -> {success} ) { # JSON::PP::Boolean
$json_body -> {message};