class Yt::Collections::VideoCategories

Private Instance Methods

attributes_for_new_item(data) click to toggle source
# File lib/yt/collections/video_categories.rb, line 10
def attributes_for_new_item(data)
  {}.tap do |attributes|
    attributes[:id] = data['id']
    attributes[:snippet] = data['snippet']
    attributes[:auth] = @auth
  end
end
list_params() click to toggle source

@return [Hash] the parameters to submit to YouTube to list video categories. @see developers.google.com/youtube/v3/docs/videoCategories/list

Calls superclass method Yt::Actions::List#list_params
# File lib/yt/collections/video_categories.rb, line 20
def list_params
  super.tap do |params|
    params[:params] = video_categories_params
  end
end
video_categories_params() click to toggle source
# File lib/yt/collections/video_categories.rb, line 26
def video_categories_params
  {}.tap do |params|
    params[:part] = 'snippet'
    params[:id] = @parent.category_id if @parent
    apply_where_params! params
  end
end