Skip to content

Run a search

Jess edited this page Jun 24, 2016 · 2 revisions

To run a search, simply call:

Whowas.search(input)

input should be a hash, and its keys will determine which recipe is used. Common keys include :timestamp, :ip, :port, and :mac, but you can customize the recipes to allow for nearly any type of input.

The search should return a hash containing the following elements:

{
  input: { key1: "value1" }, # the salient information from the final result string
  results: [ "result1", "result2" ], # all raw result strings
  error: "" # optional, an error string if the search terminated with an error
}
Clone this wiki locally