Fullscreen/yt — pull request #76 by claudiofullscreen (2014-08-20 21:21:01+00:00)
Title: Asset and ownership

This PR takes all the feedback and features from #75 and adds documentation, tests and removes repetitions.

The original request from #75 was to be able to claim a video with an existing policy and tell YouTube to only run a specific type of ads on that video. After this PR, all of this can be obtained with:

```ruby
# Initialize the CMS content owner
content_owner = Yt::ContentOwner.new owner_name: 'CMSNAME', access_token: 'ya29.1.ABCDEFGHIJ'

# Create an empty asset and gain full ownership (100% in every territory)
asset = content_owner.create_asset type: 'web'
asset.ownership.obtain!

# Create a new claim that associates the video with the newly created asset and a custom policy (such as "Monetize everywhere"
content_owner.create_claim asset_id: asset.id, video_id: 'VIDEO_ID', policy_id: 'POLICY_ID', content_type: "audiovisual"

# Tell YouTube to only run long + standard instream ads on that video
ad_options = Yt::AdvertisingOptionsSet.new video_id: 'VIDEO_ID', auth: content_owner
ad_options.update ad_formats: %w(standard_instream long)
```