Class: Mihari::Clients::GooglePublicDNS
- Defined in:
- lib/mihari/clients/google_public_dns.rb
Overview
Google Public DNS enricher
Instance Attribute Summary
Attributes inherited from Base
#base_url, #headers, #pagination_interval, #timeout
Instance Method Summary collapse
-
#initialize(base_url = "https://dns.google", headers: {}, timeout: nil) ⇒ GooglePublicDNS
constructor
A new instance of GooglePublicDNS.
-
#query_all(name) ⇒ Mihari::Structs::GooglePublicDNS::Response?
Query Google Public DNS by resource type.
Constructor Details
#initialize(base_url = "https://dns.google", headers: {}, timeout: nil) ⇒ GooglePublicDNS
Returns a new instance of GooglePublicDNS.
14 15 16 |
# File 'lib/mihari/clients/google_public_dns.rb', line 14 def initialize(base_url = "https://dns.google", headers: {}, timeout: nil) super(base_url, headers:, timeout:) end |
Instance Method Details
#query_all(name) ⇒ Mihari::Structs::GooglePublicDNS::Response?
Query Google Public DNS by resource type
25 26 27 28 |
# File 'lib/mihari/clients/google_public_dns.rb', line 25 def query_all(name) Structs::GooglePublicDNS::Response.from_dynamic! get_json("/resolve", params: {name:, type: "ALL"}) end |