=> eval {
return 0 if HAVE_HTTP_TINY; # unnecessary
require LWP::UserAgent; 1;
};
use JSON::PP;
use constant ENDPOINT_URL => 'https://api.pushover.net';
use constant HTTP_TIMEOUT => 1
my $res = $self->_http_get( ENDPOINT_URL . '/1/sounds.json?token=' . $self->{token} );
if ( $res->{success} ) {
my $data = $self->_json_parser->decode($res->{content});
my @sounds
Sounds API is failed.";
}
}
# JSON Parser accessor
sub _json_parser {
my $self = shift;
$self->{json_parser} ||= JSON::PP->new();
return $self->{json_parser};
}
# Browser accessor
su
=> eval {
return 0 if HAVE_HTTP_TINY; # unnecessary
require LWP::UserAgent; 1;
};
use JSON::PP;
use constant ENDPOINT_URL => 'https://api.pushover.net';
use constant HTTP_TIMEOUT => 1
my $res = $self->_http_get( ENDPOINT_URL . '/1/sounds.json?token=' . $self->{token} );
if ( $res->{success} ) {
my $data = $self->_json_parser->decode($res->{content});
my @sounds
Sounds API is failed.";
}
}
# JSON Parser accessor
sub _json_parser {
my $self = shift;
$self->{json_parser} ||= JSON::PP->new();
return $self->{json_parser};
}
# Browser accessor
su