class URLVoid::Host
Public Class Methods
info(host_name)
click to toggle source
Retrieve information about a specific website
@return [Hash] Parsed response
# File lib/rb-urlvoid/host.rb, line 7 def self.info(host_name) res = Client.query_api("/host/#{host_name}/") return res unless res.key?("detections") # if "detections" key exists, refill "engines" values as an Array engines = res["detections"]["engines"].values.flatten res["detections"]["engines"] = engines res end
new_scan(host_name)
click to toggle source
Scan a new website not present in the URLVoid's database
@return [Hash] Parsed response
# File lib/rb-urlvoid/host.rb, line 27 def self.new_scan(host_name) Client.query_api("/host/#{host_name}/newscan/") end
rescan(host_name)
click to toggle source
Rescan of a specific website
@return [Hash] Parsed response
# File lib/rb-urlvoid/host.rb, line 20 def self.rescan(host_name) Client.query_api("/host/#{host_name}/rescan/") end