Class: ZoomEye::Clients::Web

Inherits:
Base
  • Object
show all
Defined in:
lib/zoomeye/clients/web.rb

Constant Summary

Constants inherited from Base

Base::BASE_URL, Base::HOST

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ZoomEye::Clients::Base

Instance Method Details

#search(query, page: nil, facets: nil) ⇒ Hash

Search the Web technologies

Parameters:

  • query (String)

    Query string

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

    The page number to paging(default:1)

  • facets (String, nil) (defaults to: nil)

    A comma-separated list of properties to get summary information on query

Returns:

  • (Hash)

15
16
17
18
19
20
21
22
23
# File 'lib/zoomeye/clients/web.rb', line 15

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

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