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

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

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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SearchResultSnippet

Returns a new instance of SearchResultSnippet.



6550
6551
6552
# File 'generated/google/apis/youtube_v3/classes.rb', line 6550

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)


6514
6515
6516
# File 'generated/google/apis/youtube_v3/classes.rb', line 6514

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)


6520
6521
6522
# File 'generated/google/apis/youtube_v3/classes.rb', line 6520

def channel_title
  @channel_title
end

#descriptionString

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

Returns:

  • (String)


6525
6526
6527
# File 'generated/google/apis/youtube_v3/classes.rb', line 6525

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)


6532
6533
6534
# File 'generated/google/apis/youtube_v3/classes.rb', line 6532

def live_broadcast_content
  @live_broadcast_content
end

#published_atDateTime

The creation date and time of the resource that the search result identifies. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. Corresponds to the JSON property publishedAt

Returns:

  • (DateTime)


6538
6539
6540
# File 'generated/google/apis/youtube_v3/classes.rb', line 6538

def published_at
  @published_at
end

#thumbnailsGoogle::Apis::YoutubeV3::ThumbnailDetails

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



6543
6544
6545
# File 'generated/google/apis/youtube_v3/classes.rb', line 6543

def thumbnails
  @thumbnails
end

#titleString

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

Returns:

  • (String)


6548
6549
6550
# File 'generated/google/apis/youtube_v3/classes.rb', line 6548

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6555
6556
6557
6558
6559
6560
6561
6562
6563
# File 'generated/google/apis/youtube_v3/classes.rb', line 6555

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