Sha256: b9a2d6e331ce4240cd950cc55e2fbe1a36d606e1995cf429eda84571a053766f
Contents?: true
Size: 1.9 KB
Versions: 1
Compression:
Stored size: 1.9 KB
Contents
# frozen_string_literal: true module SecurityTrails module Clients class Domain < Client # # Returns the current data about the given domain. In addition to the current data, you also get the current statistics associated with a particular record. For example, for a records you'll get how many other domains have the same IP. # # @see https://docs.securitytrails.com/reference#get-domain # # @param [String] hostname # # @return [Hash] # def get_by_hostname(hostname) get("/domain/#{hostname}") { |json| json } end # # Returns subdomains for a given hostname # # @see https://docs.securitytrails.com/reference#list-subdomains # # @param [String] hostname # # @return [Hash] # def get_subdomains(hostname) get("/domain/#{hostname}/subdomains") { |json| json } end # # Returns tags for a given hostname # # @see https://docs.securitytrails.com/reference#list-tags # # @param [String] hostname # # @return [Hash] # def get_tags(hostname) get("/domain/#{hostname}/tags") { |json| json } end # # Find all domains that are related to a domain you input # # @see https://docs.securitytrails.com/reference#find-associated-domains # # @param [String] hostname # # @return [Hash] # def get_associated_domains(hostname) get("/domain/#{hostname}/associated") { |json| json } end # # Returns the current WHOIS data about a given domain with the stats merged together # # @see https://docs.securitytrails.com/reference#get-whois # # @param [String] hostname # # @return [Hash] # def get_whois(hostname) get("/domain/#{hostname}/whois") { |json| json } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
securitytrails-1.0.0 | lib/securitytrails/clients/domain.rb |