Class: Yt::Models::AdvertisingOptionsSet
- Defined in:
- lib/yt/models/advertising_options_set.rb
Overview
Encapsulates advertising options of a video, such as the types of ads that can run during the video as well as the times when ads are allowed to run during the video.
Instance Method Summary collapse
-
#ad_formats ⇒ Array<String>
Return the list of ad formats that the video is allowed to show.
-
#initialize(options = {}) ⇒ AdvertisingOptionsSet
constructor
A new instance of AdvertisingOptionsSet.
- #update(attributes = {}) ⇒ Object
Methods included from Associations::HasReports
Methods included from Associations::HasViewerPercentages
Methods included from Associations::HasOne
Methods included from Associations::HasMany
Methods included from Associations::HasAuthentication
Constructor Details
#initialize(options = {}) ⇒ AdvertisingOptionsSet
Returns a new instance of AdvertisingOptionsSet.
10 11 12 13 14 |
# File 'lib/yt/models/advertising_options_set.rb', line 10 def initialize( = {}) @auth = [:auth] @video_id = [:video_id] @data = [:data] end |
Instance Method Details
#ad_formats ⇒ Array<String>
Return the list of ad formats that the video is allowed to show. Valid values for this property are: long, overlay, standard_instream, third_party, trueview_inslate, or trueview_instream.
27 28 29 |
# File 'lib/yt/models/advertising_options_set.rb', line 27 def ad_formats @data['adFormats'] end |
#update(attributes = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/yt/models/advertising_options_set.rb', line 16 def update(attributes = {}) underscore_keys! attributes do_patch(body: attributes) {|data| @data = data} true end |