Class: OTX::Reputation
Overview
Retrieve and parse into the appropriate object the reputation for an IP Address from the OTX System
Instance Method Summary collapse
-
#get_reputation(ip, type = :ipv4) ⇒ OTX::Pulse
Download an individually identified IP Address Reputation and parse the output.
Methods inherited from Base
#get, #initialize, #patch, #post
Constructor Details
This class inherits a constructor from OTX::Base
Instance Method Details
#get_reputation(ip, type = :ipv4) ⇒ OTX::Pulse
Download an individually identified IP Address Reputation and parse the output
13 14 15 16 17 18 19 20 21 |
# File 'lib/otx_ruby/reputation.rb', line 13 def get_reputation(ip, type=:ipv4) uri = "api/v1/indicators/#{type == :ipv6 ? "IPv6" : "IPv4"}/#{ip}/reputation" json_data = get(uri) reputation = OTX::Indicator::IP::Reputation.new(json_data["reputation"]) return reputation end |