class Yt::Collections::AdvertisingOptionsSets
Provides methods to interact with a the advertising options of a YouTube video.
Resources
with advertising options are: {Yt::Models::Video videos}.
Private Instance Methods
Source
# File lib/yt/collections/advertising_options_sets.rb, line 13 def attributes_for_new_item(data) {data: data, video_id: @parent.id, auth: @auth} end
Source
# File lib/yt/collections/advertising_options_sets.rb, line 28 def fetch_page(params = {}) response = list_request(params).run {items: [response.body], token: nil} end
@private @note AdvertisingOptionsSets
overwrites fetch_page
since it’s a get.
Source
# File lib/yt/collections/advertising_options_sets.rb, line 19 def list_params super.tap do |params| params[:path] = "/youtube/partner/v1/videoAdvertisingOptions/#{@parent.id}" params[:params] = {on_behalf_of_content_owner: @auth.owner_name} end end
@return [Hash] the parameters to submit to YouTube to get video advertising options. @see developers.google.com/youtube/partner/docs/v1/videoAdvertisingOptions/get
Calls superclass method