class PassiveTotal::Client::WHOIS

Public Instance Methods

get(query, compact_record: nil, history: nil) click to toggle source

Retrieves the WHOIS data for the specified query api.passivetotal.org/api/docs/#api-WHOIS-GetV2Whois

@param [String] query the domain being queried @param [String, nil] compact_record whether to compress the results @param [String, nil] history whether to return historical results

@return [Hash]

# 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) click to toggle source

Search WHOIS data for a keyword. api.passivetotal.org/api/docs/#api-WHOIS-GetV2WhoisSearchKeyword

@param [String] query being queried

@return [Hash]

# File lib/passivetotal/clients/whois.rb, line 34
def keyword(query)
  params = {
    query: query,
  }.compact

  _get("/whois/search/keyword", params) { |json| json }
end