Class: PassiveTotal::Client::WHOIS
- Defined in:
- lib/passivetotal/clients/whois.rb
Constant Summary
Constants inherited from Base
Base::BASE_URL, Base::HOST, Base::VERSION
Instance Method Summary collapse
-
#get(query, compact_record: nil, history: nil) ⇒ Hash
Retrieves the WHOIS data for the specified query api.passivetotal.org/api/docs/#api-WHOIS-GetV2Whois.
-
#keyword(query) ⇒ Hash
Search WHOIS data for a keyword.
-
#search(query:, field:) ⇒ Hash
Searches WHOIS data by field and query.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PassiveTotal::Client::Base
Instance Method Details
#get(query, compact_record: nil, history: nil) ⇒ Hash
Retrieves the WHOIS data for the specified query api.passivetotal.org/api/docs/#api-WHOIS-GetV2Whois
16 17 18 19 20 21 22 23 24 |
# File 'lib/passivetotal/clients/whois.rb', line 16 def get(query, compact_record: nil, history: nil) params = { query: query, compact_record: compact_record, history: history, }.compact _get("/whois", params) { |json| json } end |
#keyword(query) ⇒ Hash
Search WHOIS data for a keyword. api.passivetotal.org/api/docs/#api-WHOIS-GetV2WhoisSearchKeyword
34 35 36 37 38 39 40 |
# File 'lib/passivetotal/clients/whois.rb', line 34 def keyword(query) params = { query: query, }.compact _get("/whois/search/keyword", params) { |json| json } end |
#search(query:, field:) ⇒ Hash
Searches WHOIS data by field and query. api.passivetotal.org/api/docs/#api-WHOIS-GetV2WhoisSearch
51 52 53 54 55 56 57 58 |
# File 'lib/passivetotal/clients/whois.rb', line 51 def search(query:, field:) params = { query: query, field: field, }.compact _get("/whois/search", params) { |json| json } end |