Class: Google::Apis::YoutubeV3::SearchResult

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_v3/classes.rb,
generated/google/apis/youtube_v3/representations.rb,
generated/google/apis/youtube_v3/representations.rb

Overview

A search result contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SearchResult

Returns a new instance of SearchResult



6250
6251
6252
# File 'generated/google/apis/youtube_v3/classes.rb', line 6250

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#etagString

Etag of this resource. Corresponds to the JSON property etag

Returns:

  • (String)


6231
6232
6233
# File 'generated/google/apis/youtube_v3/classes.rb', line 6231

def etag
  @etag
end

#idGoogle::Apis::YoutubeV3::ResourceId

A resource id is a generic reference that points to another YouTube resource. Corresponds to the JSON property id



6236
6237
6238
# File 'generated/google/apis/youtube_v3/classes.rb', line 6236

def id
  @id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "youtube# searchResult". Corresponds to the JSON property kind

Returns:

  • (String)


6242
6243
6244
# File 'generated/google/apis/youtube_v3/classes.rb', line 6242

def kind
  @kind
end

#snippetGoogle::Apis::YoutubeV3::SearchResultSnippet

Basic details about a search result, including title, description and thumbnails of the item referenced by the search result. Corresponds to the JSON property snippet



6248
6249
6250
# File 'generated/google/apis/youtube_v3/classes.rb', line 6248

def snippet
  @snippet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6255
6256
6257
6258
6259
6260
# File 'generated/google/apis/youtube_v3/classes.rb', line 6255

def update!(**args)
  @etag = args[:etag] if args.key?(:etag)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @snippet = args[:snippet] if args.key?(:snippet)
end