WebService::AbuseIPDB::ReportResponse - Specific class for responses to the report method of WebService::AbuseIPDB.
report
The report method of WebService::AbuseIPDB will return an object of this class. It is a subclass of the generic WebService::AbuseIPDB::Response class.
use WebService::AbuseIPDB; my $ipdb = WebService::AbuseIPDB->new (key => 'abc123...'); my $res = $ipdb->report (ip => '127.0.0.2', categories => [3], comment => 'Over 3000 attacks in the last hour'); unless ($res->successful) { for my $err (@{$res->errors}) { warn "Error $err->{status}: $err->{detail}\n"; } die "Cannot continue.\n"; } printf "%s has a score of %i\n", $res->ip, $res->score;
The new, successful and errors methods are inherited from WebService::AbuseIPDB::Response. All other methods are accessors as listed here.
new
successful
errors
Returns the abuse score as an integer between 0 and 100 inclusive.
Returns the IP address itself as a string.
This is currently alpha software. Be aware that both the internals and the interface are liable to change.
Pete Houston, <cpan at openstrike.co.uk>
<cpan at openstrike.co.uk>
WebService::AbuseIPDB for general use of the client, WebService::AbuseIPDB::Response for the parent class and Version 2 of the AbuseIPDB API for API details/restrictions.
Copyright © 2020 Pete Houston
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991 or at your option any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A copy of the GNU General Public License is available in the source tree; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
To install WebService::AbuseIPDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::AbuseIPDB
CPAN shell
perl -MCPAN -e shell install WebService::AbuseIPDB
For more information on module installation, please visit the detailed CPAN module installation guide.