Module: BinaryEdge::Client::Action::Search

Included in:
Domains, Host, Image, Sensors, Torrent
Defined in:
lib/binaryedge/clients/actions/search.rb

Instance Method Summary collapse

Instance Method Details

#search(query, page: 1, only_ips: nil) ⇒ Hash

Events based on a Query.

Parameters:

  • query (String)

    String used to query our data

  • page (Integer) (defaults to: 1)

    Default 1, Maximum: 500

  • only_ips (Integer, nil) (defaults to: nil)

    If selected, only output IP addresses, ports and protocols.

Returns:

  • (Hash)


16
17
18
19
20
21
22
23
24
# File 'lib/binaryedge/clients/actions/search.rb', line 16

def search(query, page: 1, only_ips: nil)
  params = {
    query: query,
    page: page,
    only_ips: only_ips
  }.compact

  _get("/#{base_path}/search", params) { |json| json }
end