Class: Google::Apis::YoutubeV3::CommentThreadSnippet

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 comment thread.

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) ⇒ CommentThreadSnippet

Returns a new instance of CommentThreadSnippet.


2431
2432
2433
# File 'generated/google/apis/youtube_v3/classes.rb', line 2431

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

Instance Attribute Details

#can_replyBoolean Also known as: can_reply?

Whether the current viewer of the thread can reply to it. This is viewer specific - other viewers may see a different value for this field. Corresponds to the JSON property canReply

Returns:

  • (Boolean)

2398
2399
2400
# File 'generated/google/apis/youtube_v3/classes.rb', line 2398

def can_reply
  @can_reply
end

#channel_idString

The YouTube channel the comments in the thread refer to or the channel with the video the comments refer to. If video_id isn't set the comments refer to the channel itself. Corresponds to the JSON property channelId

Returns:

  • (String)

2406
2407
2408
# File 'generated/google/apis/youtube_v3/classes.rb', line 2406

def channel_id
  @channel_id
end

#is_publicBoolean Also known as: is_public?

Whether the thread (and therefore all its comments) is visible to all YouTube users. Corresponds to the JSON property isPublic

Returns:

  • (Boolean)

2412
2413
2414
# File 'generated/google/apis/youtube_v3/classes.rb', line 2412

def is_public
  @is_public
end

#top_level_commentGoogle::Apis::YoutubeV3::Comment

A comment represents a single YouTube comment. Corresponds to the JSON property topLevelComment


2418
2419
2420
# File 'generated/google/apis/youtube_v3/classes.rb', line 2418

def top_level_comment
  @top_level_comment
end

#total_reply_countFixnum

The total number of replies (not including the top level comment). Corresponds to the JSON property totalReplyCount

Returns:

  • (Fixnum)

2423
2424
2425
# File 'generated/google/apis/youtube_v3/classes.rb', line 2423

def total_reply_count
  @total_reply_count
end

#video_idString

The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment. Corresponds to the JSON property videoId

Returns:

  • (String)

2429
2430
2431
# File 'generated/google/apis/youtube_v3/classes.rb', line 2429

def video_id
  @video_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2436
2437
2438
2439
2440
2441
2442
2443
# File 'generated/google/apis/youtube_v3/classes.rb', line 2436

def update!(**args)
  @can_reply = args[:can_reply] if args.key?(:can_reply)
  @channel_id = args[:channel_id] if args.key?(:channel_id)
  @is_public = args[:is_public] if args.key?(:is_public)
  @top_level_comment = args[:top_level_comment] if args.key?(:top_level_comment)
  @total_reply_count = args[:total_reply_count] if args.key?(:total_reply_count)
  @video_id = args[:video_id] if args.key?(:video_id)
end