Class: SecurityTrails::Clients::Domain
- Inherits:
-
SecurityTrails::Client
- Object
- SecurityTrails::Client
- SecurityTrails::Clients::Domain
- Defined in:
- lib/securitytrails/clients/domain.rb
Constant Summary
Constants inherited from SecurityTrails::Client
SecurityTrails::Client::API_KEY_HEADER, SecurityTrails::Client::HOST, SecurityTrails::Client::URL, SecurityTrails::Client::VERSION
Instance Attribute Summary
Attributes inherited from SecurityTrails::Client
Instance Method Summary collapse
-
#get_associated_domains(hostname) ⇒ Hash
Find all domains that are related to a domain you input.
-
#get_by_hostname(hostname) ⇒ Hash
Returns the current data about the given domain.
-
#get_subdomains(hostname) ⇒ Hash
Returns subdomains for a given hostname.
-
#get_tags(hostname) ⇒ Hash
Returns tags for a given hostname.
-
#get_whois(hostname) ⇒ Hash
Returns the current WHOIS data about a given domain with the stats merged together.
Methods inherited from SecurityTrails::Client
Constructor Details
This class inherits a constructor from SecurityTrails::Client
Instance Method Details
#get_associated_domains(hostname) ⇒ Hash
Find all domains that are related to a domain you input
54 55 56 |
# File 'lib/securitytrails/clients/domain.rb', line 54 def get_associated_domains(hostname) get("/domain/#{hostname}/associated") { |json| json } end |
#get_by_hostname(hostname) ⇒ Hash
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.
15 16 17 |
# File 'lib/securitytrails/clients/domain.rb', line 15 def get_by_hostname(hostname) get("/domain/#{hostname}") { |json| json } end |
#get_subdomains(hostname) ⇒ Hash
Returns subdomains for a given hostname
28 29 30 |
# File 'lib/securitytrails/clients/domain.rb', line 28 def get_subdomains(hostname) get("/domain/#{hostname}/subdomains") { |json| json } end |
#get_tags(hostname) ⇒ Hash
Returns tags for a given hostname
41 42 43 |
# File 'lib/securitytrails/clients/domain.rb', line 41 def (hostname) get("/domain/#{hostname}/tags") { |json| json } end |
#get_whois(hostname) ⇒ Hash
Returns the current WHOIS data about a given domain with the stats merged together
67 68 69 |
# File 'lib/securitytrails/clients/domain.rb', line 67 def get_whois(hostname) get("/domain/#{hostname}/whois") { |json| json } end |