Class: GreyNoise::Clients::Experimental
- Defined in:
- lib/greynoise/clients/experimental.rb
Constant Summary
Constants inherited from Client
Client::BASE_URL, Client::HOST, Client::VERSION
Instance Attribute Summary
Attributes inherited from Client
Instance Method Summary collapse
-
#gnql(query, size: nil, scroll: nil) ⇒ Hash
GNQL (GreyNoise Query Language) is a domain-specific query language that uses Lucene deep under the hood.
-
#gnql_stats(query, count: nil) ⇒ Hash
Get aggregate statistics for the top organizations, actors, tags, ASNs, countries, classifications, and operating systems of all the results of a given GNQL query.
Methods inherited from Client
Constructor Details
This class inherits a constructor from GreyNoise::Clients::Client
Instance Method Details
#gnql(query, size: nil, scroll: nil) ⇒ Hash
GNQL (GreyNoise Query Language) is a domain-specific query language that uses Lucene deep under the hood
15 16 17 18 19 20 21 22 |
# File 'lib/greynoise/clients/experimental.rb', line 15 def gnql(query, size: nil, scroll: nil) params = { query: query, size: size, scroll: scroll }.compact _get("/experimental/gnql", params) { |json| json } end |
#gnql_stats(query, count: nil) ⇒ Hash
Get aggregate statistics for the top organizations, actors, tags, ASNs, countries, classifications, and operating systems of all the results of a given GNQL query.
32 33 34 35 36 37 38 |
# File 'lib/greynoise/clients/experimental.rb', line 32 def gnql_stats(query, count: nil) params = { query: query, count: count }.compact _get("/experimental/gnql/stats", params) { |json| json } end |