class PassiveTotal::Client::Host

Public Instance Methods

components(query, start_at: nil, end_at: nil) click to toggle source

Retrieves the host attribute components of a query. api.passivetotal.org/api/docs/#api-Host_Attributes-GetV2HostAttributesComponents

@param [String] query @param [String, nil] start_at @param [String, nil] end_at

@return [Hash]

# File lib/passivetotal/clients/host.rb, line 16
def components(query, start_at: nil, end_at: nil)
  params = {
    query: query,
    start: start_at,
    end: end_at,
  }.compact

  _get("/host-attributes/components", params) { |json| json }
end
pairs(query, direction: "children", start_at: nil, end_at: nil) click to toggle source

Retrieves the host attribute pairs related to the query. api.passivetotal.org/api/docs/#api-Host_Attributes-GetV2HostAttributesComponents

@param [String] query @param [String] direction @param [String] start_at @param [String] end_at

@return [Hash]

# File lib/passivetotal/clients/host.rb, line 37
def pairs(query, direction: "children", start_at: nil, end_at: nil)
  params = {
    query: query,
    direction: direction,
    start: start_at,
    end: end_at,
  }.compact

  _get("/host-attributes/pairs", params) { |json| json }
end
trackers(query, start_at: nil, end_at: nil) click to toggle source

Retrieves the host attribute trackers api.passivetotal.org/api/docs/#api-Host_Attributes-GetV2HostAttributesTrackers

@param [String] query @param [String, nil] start_at @param [String, nil] end_at

@return [Hash]

# File lib/passivetotal/clients/host.rb, line 58
def trackers(query, start_at: nil, end_at: nil)
  params = {
    query: query,
    start: start_at,
    end: end_at,
  }.compact

  _get("/host-attributes/trackers", params) { |json| json }
end