class Yt::Collections::CommentThreads
@private
Private Instance Methods
attributes_for_new_item(data)
click to toggle source
# File lib/yt/collections/comment_threads.rb, line 12 def attributes_for_new_item(data) {}.tap do |attributes| attributes[:id] = data['id'] attributes[:snippet] = data['snippet'] attributes[:auth] = @auth end end
comments_params()
click to toggle source
# File lib/yt/collections/comment_threads.rb, line 29 def comments_params apply_where_params!({max_results: 100, part: 'snippet'}).tap do |params| case @parent when Yt::Video params[:videoId] = @parent.id when Yt::Channel params[:channelId] = @parent.id end end end
list_params()
click to toggle source
@return [Hash] the parameters to submit to YouTube to get the resource. @see developers.google.com/youtube/v3/docs/commentThreads#resource
Calls superclass method
Yt::Actions::List#list_params
# File lib/yt/collections/comment_threads.rb, line 22 def list_params super.tap do |params| params[:path] = "/youtube/v3/commentThreads" params[:params] = comments_params end end