Comments

Yt::CommentThread represents a YouTube comment thread.

Yt::Comment represents a top level comment of a thread or a reply to a comment.

comment_thread = Yt::CommentThread.new id: 'z13fsrejbwf3dziea22pd5trmyqbjteoa04'
comment = Yt::Comment.new id: 'z13fsrejbwf3dziea22pd5trmyqbjteoa04'

Video/Channel Comments

To retrieve all comment threads of a video or channel, you can use associations.

video = Yt::Video.new(id: 'WW4Bg43afvk')
video.comment_threads # => <Yt::Collections::CommentThreads ...>
channel = Yt::Channel.new(id: 'UCKG1g_by7n00g3rdjWVFOIQ')
channel.comment_threads # => <Yt::Collections::CommentThreads ...>

List of Yt::CommentThread methods

→ Yt docscomment_thread.video_id # => "BPNYv0vd78A"
→ Yt docscomment_thread.total_reply_count # => 3
→ Yt docscomment_thread.public? # => true
→ Yt docscomment_thread.can_reply? # => true

→ Yt docscomment_thread.top_level_comment # => <Yt::Comment ...>"
→ Yt docscomment_thread.text_display # => "totally awesome"
→ Yt docscomment_thread.author_display_name # => "Jack"
→ Yt docscomment_thread.like_count # => 99
→ Yt docscomment_thread.updated_at # => 2015-03-31 06:46:46 UTC

List of Yt::Comment methods

→ Yt docscomment.video_id # => "sojBKlt1Fik"
→ Yt docscomment.text_display # => "totally awesome"
→ Yt docscomment.author_display_name # => "Jack"
→ Yt docscomment.like_count # => 99
→ Yt docscomment.updated_at # => 2015-03-31 06:46:46 UTC
→ Yt docscomment.parent_id # => "z13cffaoaqrvvtwfm23vzzdh3w3xupe1w"