Class: Yt::Models::Asset
Overview
Provides methods to interact with YouTube ContentID assets.
Constant Summary collapse
- STATUSES =
Status
%q(active inactive pending)
Instance Attribute Summary collapse
-
#auth ⇒ Object
readonly
Returns the value of attribute auth.
-
#ownership ⇒ Yt::Models::Ownership
readonly
The asset’s ownership.
Instance Method Summary collapse
-
#id ⇒ String
The ID that YouTube assigns and uses to uniquely identify the asset.
-
#initialize(options = {}) ⇒ Asset
constructor
A new instance of Asset.
-
#type ⇒ String
The asset’s type.
- #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 = {}) ⇒ Asset
10 11 12 13 14 |
# File 'lib/yt/models/asset.rb', line 10 def initialize( = {}) @data = [:data] @id = [:id] @auth = [:auth] end |
Instance Attribute Details
#auth ⇒ Object (readonly)
Returns the value of attribute auth.
8 9 10 |
# File 'lib/yt/models/asset.rb', line 8 def auth @auth end |
#ownership ⇒ Yt::Models::Ownership (readonly)
24 |
# File 'lib/yt/models/asset.rb', line 24 has_one :ownership |
Instance Method Details
#id ⇒ String
45 |
# File 'lib/yt/models/asset.rb', line 45 has_attribute :id |
#type ⇒ String
55 |
# File 'lib/yt/models/asset.rb', line 55 has_attribute :type |
#update(attributes = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/yt/models/asset.rb', line 16 def update(attributes = {}) underscore_keys! attributes do_patch body: attributes true end |