Module: BinaryEdge::Client::Action::Stats

Included in:
Host, Sensors, Torrent
Defined in:
lib/binaryedge/clients/actions/stats.rb

Instance Method Summary collapse

Instance Method Details

#stats(query, type:, order:) ⇒ Array

Statistics of recent events for the given query.

Parameters:

  • query (String)

    String used to query our data.

  • type (String)

    Type of statistic we want to obtain.

  • order (String)

    Whether to sort descendently or ascendently to get the top.

Returns:

  • (Array)


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

def stats(query, type:, order:)
  params = {
    query: query,
    type: type,
    order: order
  }

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