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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CommentThreadSnippet

Returns a new instance of CommentThreadSnippet.



2516
2517
2518
# File 'lib/google/apis/youtube_v3/classes.rb', line 2516

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)


2479
2480
2481
# File 'lib/google/apis/youtube_v3/classes.rb', line 2479

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 neither video_id nor post_id is set the comments refer to the channel itself. Corresponds to the JSON property channelId

Returns:

  • (String)


2487
2488
2489
# File 'lib/google/apis/youtube_v3/classes.rb', line 2487

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)


2493
2494
2495
# File 'lib/google/apis/youtube_v3/classes.rb', line 2493

def is_public
  @is_public
end

#post_idString

The ID of the post the comments refer to, if any. Corresponds to the JSON property postId

Returns:

  • (String)


2499
2500
2501
# File 'lib/google/apis/youtube_v3/classes.rb', line 2499

def post_id
  @post_id
end

#top_level_commentGoogle::Apis::YoutubeV3::Comment

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



2504
2505
2506
# File 'lib/google/apis/youtube_v3/classes.rb', line 2504

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)


2509
2510
2511
# File 'lib/google/apis/youtube_v3/classes.rb', line 2509

def total_reply_count
  @total_reply_count
end

#video_idString

The ID of the video the comments refer to, if any. Corresponds to the JSON property videoId

Returns:

  • (String)


2514
2515
2516
# File 'lib/google/apis/youtube_v3/classes.rb', line 2514

def video_id
  @video_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2521
2522
2523
2524
2525
2526
2527
2528
2529
# File 'lib/google/apis/youtube_v3/classes.rb', line 2521

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)
  @post_id = args[:post_id] if args.key?(:post_id)
  @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