Class: Yt::Models::ContentOwner

Inherits:
Account show all
Defined in:
lib/yt/models/content_owner.rb

Overview

Provides methods to interact with YouTube CMS accounts.

Instance Attribute Summary collapse

Attributes inherited from Account

#channel, #content_owners, #owner_name, #playlists, #resumable_sessions, #subscribers, #user_info, #videos

Instance Method Summary collapse

Methods inherited from Account

#create_playlist, #upload_video

Methods included from Associations::HasReports

#has_report

Methods included from Associations::HasViewerPercentages

#has_viewer_percentages

Methods included from Associations::HasOne

#has_one

Methods included from Associations::HasMany

#has_many

Methods included from Associations::HasAuthentication

#has_authentication

Constructor Details

#initialize(options = {}) ⇒ ContentOwner

Returns a new instance of ContentOwner.



30
31
32
33
# File 'lib/yt/models/content_owner.rb', line 30

def initialize(options = {})
  super options
  @owner_name = options[:owner_name]
end

Instance Attribute Details

#assetsYt::Collection::Assets (readonly)

Returns the assets administered by the content owner.

Returns:

  • (Yt::Collection::Assets)

    the assets administered by the content owner.



20
# File 'lib/yt/models/content_owner.rb', line 20

has_many :assets

#claimsYt::Collections::Claims (readonly)

Returns the claims administered by the content owner.

Returns:



16
# File 'lib/yt/models/content_owner.rb', line 16

has_many :claims

#partnered_channelsYt::Collections::PartneredChannels (readonly)

Returns the channels managed by the CMS account.

Returns:



12
# File 'lib/yt/models/content_owner.rb', line 12

has_many :partnered_channels

#policiesYt::Collections::Policies (readonly)

Returns the policies saved by the content owner.

Returns:



28
# File 'lib/yt/models/content_owner.rb', line 28

has_many :policies

#referencesYt::Collections::References (readonly)

Returns the references administered by the content owner.

Returns:



24
# File 'lib/yt/models/content_owner.rb', line 24

has_many :references

Instance Method Details

#create_asset(params = {}) ⇒ Object



39
40
41
# File 'lib/yt/models/content_owner.rb', line 39

def create_asset(params = {})
  assets.insert params
end

#create_claim(params = {}) ⇒ Object



43
44
45
# File 'lib/yt/models/content_owner.rb', line 43

def create_claim(params = {})
  claims.insert params
end

#create_reference(params = {}) ⇒ Object



35
36
37
# File 'lib/yt/models/content_owner.rb', line 35

def create_reference(params = {})
  references.insert params
end