File Coverage

blib/lib/WebService/AbuseIPDB/CheckResponse.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 15 15 100.0
pod 12 12 100.0
total 48 48 100.0


line stmt bran cond sub pod time code
1             package WebService::AbuseIPDB::CheckResponse;
2             #
3             #===============================================================================
4             # FILE: CheckResponse.pm
5             # DESCRIPTION: Response for check endpoint
6             # AUTHOR: Pete Houston (pete), cpan@openstrike.co.uk
7             # ORGANIZATION: Openstrike
8             # CREATED: 12/08/19 14:51:10
9             #===============================================================================
10              
11 5     5   935 use strict;
  5         10  
  5         160  
12 5     5   27 use warnings;
  5         8  
  5         136  
13              
14 5     5   26 use parent 'WebService::AbuseIPDB::Response';
  5         11  
  5         33  
15             our $VERSION = $WebService::AbuseIPDB::Response::VERSION;
16              
17 1     1 1 417 sub cc { return shift->{data}->{countryCode} }
18 1     1 1 420 sub score { return shift->{data}->{abuseConfidenceScore} }
19 1     1 1 417 sub report_count { return shift->{data}->{totalReports} }
20 1     1 1 419 sub whitelisted { return shift->{data}->{isWhitelisted} }
21 1     1 1 476 sub isp { return shift->{data}->{isp} }
22 1     1 1 423 sub last_report_time { return shift->{data}->{lastReportedAt} }
23 1     1 1 4927 sub usage_type { return shift->{data}->{usageType} }
24 1     1 1 420 sub ip { return shift->{data}->{ipAddress} }
25 1     1 1 418 sub ipv { return shift->{data}->{ipVersion} }
26 1     1 1 420 sub public { return shift->{data}->{isPublic} }
27 1     1 1 438 sub domain { return shift->{data}->{domain} }
28 1     1 1 441 sub reporter_count { return shift->{data}->{numDistinctUsers} }
29              
30             1;
31              
32             __END__