Class: Google::Apis::YoutubeV3::SearchResultSnippet

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

Overview

Basic details about a search result, including title, description and thumbnails of the item referenced by the search result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SearchResultSnippet

Returns a new instance of SearchResultSnippet.



7033
7034
7035
# File 'lib/google/apis/youtube_v3/classes.rb', line 7033

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

Instance Attribute Details

#channel_idString

The value that YouTube uses to uniquely identify the channel that published the resource that the search result identifies. Corresponds to the JSON property channelId

Returns:

  • (String)


6998
6999
7000
# File 'lib/google/apis/youtube_v3/classes.rb', line 6998

def channel_id
  @channel_id
end

#channel_titleString

The title of the channel that published the resource that the search result identifies. Corresponds to the JSON property channelTitle

Returns:

  • (String)


7004
7005
7006
# File 'lib/google/apis/youtube_v3/classes.rb', line 7004

def channel_title
  @channel_title
end

#descriptionString

A description of the search result. Corresponds to the JSON property description

Returns:

  • (String)


7009
7010
7011
# File 'lib/google/apis/youtube_v3/classes.rb', line 7009

def description
  @description
end

#live_broadcast_contentString

It indicates if the resource (video or channel) has upcoming/active live broadcast content. Or it's "none" if there is not any upcoming/active live broadcasts. Corresponds to the JSON property liveBroadcastContent

Returns:

  • (String)


7016
7017
7018
# File 'lib/google/apis/youtube_v3/classes.rb', line 7016

def live_broadcast_content
  @live_broadcast_content
end

#published_atDateTime

The creation date and time of the resource that the search result identifies. Corresponds to the JSON property publishedAt

Returns:

  • (DateTime)


7021
7022
7023
# File 'lib/google/apis/youtube_v3/classes.rb', line 7021

def published_at
  @published_at
end

#thumbnailsGoogle::Apis::YoutubeV3::ThumbnailDetails

Internal representation of thumbnails for a YouTube resource. Corresponds to the JSON property thumbnails



7026
7027
7028
# File 'lib/google/apis/youtube_v3/classes.rb', line 7026

def thumbnails
  @thumbnails
end

#titleString

The title of the search result. Corresponds to the JSON property title

Returns:

  • (String)


7031
7032
7033
# File 'lib/google/apis/youtube_v3/classes.rb', line 7031

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7038
7039
7040
7041
7042
7043
7044
7045
7046
# File 'lib/google/apis/youtube_v3/classes.rb', line 7038

def update!(**args)
  @channel_id = args[:channel_id] if args.key?(:channel_id)
  @channel_title = args[:channel_title] if args.key?(:channel_title)
  @description = args[:description] if args.key?(:description)
  @live_broadcast_content = args[:live_broadcast_content] if args.key?(:live_broadcast_content)
  @published_at = args[:published_at] if args.key?(:published_at)
  @thumbnails = args[:thumbnails] if args.key?(:thumbnails)
  @title = args[:title] if args.key?(:title)
end