Class: Yt::CommentThread
Overview
Provides methods to interact with YouTube comment threads.
Instance Attribute Summary collapse
- #channel_id ⇒ String? readonly
-
#top_level_comment ⇒ Comment
readonly
The thread’s top-level comment.
- #video_id ⇒ String? readonly
Attributes inherited from Resource
Instance Method Summary collapse
-
#comments ⇒ Yt::Relation<Yt::Comment>
The comments of a thread.
Methods inherited from Resource
#id, #initialize, #inspect, #select, where
Constructor Details
This class inherits a constructor from Yt::Resource
Instance Attribute Details
#channel_id ⇒ String? (readonly)
8 |
# File 'lib/yt/comment_thread.rb', line 8 has_attribute :channel_id, in: :snippet |
#top_level_comment ⇒ Comment (readonly)
Returns the thread’s top-level comment.
17 |
# File 'lib/yt/comment_thread.rb', line 17 has_attribute :top_level_comment, in: :snippet, type: Comment |
#video_id ⇒ String? (readonly)
13 |
# File 'lib/yt/comment_thread.rb', line 13 has_attribute :video_id, in: :snippet |
Instance Method Details
#comments ⇒ Yt::Relation<Yt::Comment>
Returns the comments of a thread.
20 21 22 23 24 25 |
# File 'lib/yt/comment_thread.rb', line 20 def comments @comments ||= Relation.new(Comment, parent_id: id, initial_items: -> {[top_level_comment]}) do || get '/youtube/v3/comments', thread_comments_params() end end |