class Yt::Collections::References
Provides methods to interact with a collection of Content ID references.
Resources
with references are: {Yt::Models::ContentOwner content owners}.
Public Instance Methods
insert(attributes = {})
click to toggle source
# File lib/yt/collections/references.rb, line 10 def insert(attributes = {}) underscore_keys! attributes body = attributes.slice(*body_params) params = {claim_id: attributes[:claim_id], on_behalf_of_content_owner: @auth.owner_name} do_insert(params: params, body: body) end
Private Instance Methods
body_params()
click to toggle source
# File lib/yt/collections/references.rb, line 41 def body_params [:content_type, :audioswap_enabled, :ignore_fps_match, :excluded_intervals] end
insert_params()
click to toggle source
@return [Hash] the parameters to submit to YouTube to add a reference. @see developers.google.com/youtube/partner/docs/v1/references/insert
Calls superclass method
Yt::Actions::Insert#insert_params
# File lib/yt/collections/references.rb, line 21 def insert_params super.tap do |params| params[:path] = '/youtube/partner/v1/references' end end
list_params()
click to toggle source
@return [Hash] the parameters to submit to YouTube to list references
administered by the content owner.
@see developers.google.com/youtube/partner/docs/v1/references/list
Calls superclass method
Yt::Actions::List#list_params
# File lib/yt/collections/references.rb, line 30 def list_params super.tap do |params| params[:params] = references_params params[:path] = '/youtube/partner/v1/references' end end
references_params()
click to toggle source
# File lib/yt/collections/references.rb, line 37 def references_params apply_where_params! on_behalf_of_content_owner: @parent.owner_name end