Class: Google::Apis::CustomsearchV1::Search
- Inherits:
-
Object
- Object
- Google::Apis::CustomsearchV1::Search
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- generated/google/apis/customsearch_v1/classes.rb,
generated/google/apis/customsearch_v1/representations.rb,
generated/google/apis/customsearch_v1/representations.rb
Overview
Response to a custom search request.
Defined Under Namespace
Classes: Queries, SearchInformation, Spelling, Url
Instance Attribute Summary collapse
-
#context ⇒ Hash<String,Object>
Metadata and refinements associated with the given search engine, including: * The name of the search engine that was used for the query.
-
#items ⇒ Array<Google::Apis::CustomsearchV1::Result>
The current set of custom search results.
-
#kind ⇒ String
Unique identifier for the type of current object.
-
#promotions ⇒ Array<Google::Apis::CustomsearchV1::Promotion>
The set of promotions.
-
#queries ⇒ Google::Apis::CustomsearchV1::Search::Queries
Query metadata for the previous, current, and next pages of results.
-
#search_information ⇒ Google::Apis::CustomsearchV1::Search::SearchInformation
Metadata about a search operation.
-
#spelling ⇒ Google::Apis::CustomsearchV1::Search::Spelling
Spell correction information for a query.
-
#url ⇒ Google::Apis::CustomsearchV1::Search::Url
OpenSearch template and URL.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Search
constructor
A new instance of Search.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Search
Returns a new instance of Search.
389 390 391 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 389 def initialize(**args) update!(**args) end |
Instance Attribute Details
#context ⇒ Hash<String,Object>
Metadata and refinements associated with the given search engine, including: *
The name of the search engine that was used for the query. * A set of facet
objects (
refinements) you can use for refining a search.
Corresponds to the JSON property context
349 350 351 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 349 def context @context end |
#items ⇒ Array<Google::Apis::CustomsearchV1::Result>
The current set of custom search results.
Corresponds to the JSON property items
354 355 356 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 354 def items @items end |
#kind ⇒ String
Unique identifier for the type of current object. For this API, it is
customsearch#search.
Corresponds to the JSON property kind
360 361 362 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 360 def kind @kind end |
#promotions ⇒ Array<Google::Apis::CustomsearchV1::Promotion>
The set of promotions. Present only if the custom search engine's configuration files
define any promotions for the given query.
Corresponds to the JSON property promotions
367 368 369 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 367 def promotions @promotions end |
#queries ⇒ Google::Apis::CustomsearchV1::Search::Queries
Query metadata for the previous, current, and next pages of results.
Corresponds to the JSON property queries
372 373 374 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 372 def queries @queries end |
#search_information ⇒ Google::Apis::CustomsearchV1::Search::SearchInformation
Metadata about a search operation.
Corresponds to the JSON property searchInformation
377 378 379 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 377 def search_information @search_information end |
#spelling ⇒ Google::Apis::CustomsearchV1::Search::Spelling
Spell correction information for a query.
Corresponds to the JSON property spelling
382 383 384 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 382 def spelling @spelling end |
#url ⇒ Google::Apis::CustomsearchV1::Search::Url
OpenSearch template and URL.
Corresponds to the JSON property url
387 388 389 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 387 def url @url end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
394 395 396 397 398 399 400 401 402 403 |
# File 'generated/google/apis/customsearch_v1/classes.rb', line 394 def update!(**args) @context = args[:context] if args.key?(:context) @items = args[:items] if args.key?(:items) @kind = args[:kind] if args.key?(:kind) @promotions = args[:promotions] if args.key?(:promotions) @queries = args[:queries] if args.key?(:queries) @search_information = args[:search_information] if args.key?(:search_information) @spelling = args[:spelling] if args.key?(:spelling) @url = args[:url] if args.key?(:url) end |