Class: MaxMind::GeoIP2::Model::AnonymousPlus

Inherits:
AnonymousIP
  • Object
show all
Defined in:
lib/maxmind/geoip2/model/anonymous_plus.rb

Overview

Model class for the Anonymous Plus database.

Instance Method Summary collapse

Methods inherited from AnonymousIP

#anonymous?, #anonymous_vpn?, #hosting_provider?, #ip_address, #network, #public_proxy?, #residential_proxy?, #tor_exit_node?

Instance Method Details

#anonymizer_confidenceInteger?

A score ranging from 1 to 99 that is our percent confidence that the network is currently part of an actively used VPN service.

Returns:

  • (Integer, nil)


15
16
17
# File 'lib/maxmind/geoip2/model/anonymous_plus.rb', line 15

def anonymizer_confidence
  get('anonymizer_confidence')
end

#network_last_seenDate?

The last day that the network was sighted in our analysis of anonymized networks. This value is parsed lazily.

Returns:

  • (Date, nil)

    A Date object representing the last seen date, or nil if the date is not available.



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/maxmind/geoip2/model/anonymous_plus.rb', line 24

def network_last_seen
  return @network_last_seen if defined?(@network_last_seen)

  date_string = get('network_last_seen')

  if !date_string
    return nil
  end

  @network_last_seen = Date.parse(date_string)
end

#provider_nameString?

The name of the VPN provider (e.g., NordVPN, SurfShark, etc.) associated with the network.

Returns:

  • (String, nil)


40
41
42
# File 'lib/maxmind/geoip2/model/anonymous_plus.rb', line 40

def provider_name
  get('provider_name')
end