Class: Pictify::VideoTemplate
- Inherits:
-
Object
- Object
- Pictify::VideoTemplate
- Defined in:
- lib/pictify/types.rb
Overview
A video template returned by list_video_templates / create_video_template
(and nested in generate_video_template results).
kind is "timeline" (studio-built) or "tsx" (Remotion scene) — both
render identically. The API keys video templates by uid and declares
variables in variableDefinitions. Unknown fields are kept in raw.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#duration_in_frames ⇒ Object
readonly
Returns the value of attribute duration_in_frames.
-
#fps ⇒ Object
readonly
Returns the value of attribute fps.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#poster_url ⇒ Object
readonly
Returns the value of attribute poster_url.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#variable_definitions ⇒ Object
readonly
Returns the value of attribute variable_definitions.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(data) ⇒ VideoTemplate
constructor
A new instance of VideoTemplate.
Constructor Details
#initialize(data) ⇒ VideoTemplate
Returns a new instance of VideoTemplate.
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/pictify/types.rb', line 274 def initialize(data) @raw = data @uid = data["uid"] @name = data["name"] @kind = data["kind"] @width = data["width"] @height = data["height"] @fps = data["fps"] @duration_in_frames = data["durationInFrames"] @poster_url = data["posterUrl"] @status = data["status"] @variable_definitions = (data["variableDefinitions"] || []).map do |v| TemplateVariableDefinition.new(v) end @created_at = parse_time(data["createdAt"]) @updated_at = parse_time(data["updatedAt"]) end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def created_at @created_at end |
#duration_in_frames ⇒ Object (readonly)
Returns the value of attribute duration_in_frames.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def duration_in_frames @duration_in_frames end |
#fps ⇒ Object (readonly)
Returns the value of attribute fps.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def fps @fps end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def height @height end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def name @name end |
#poster_url ⇒ Object (readonly)
Returns the value of attribute poster_url.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def poster_url @poster_url end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def raw @raw end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def status @status end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def uid @uid end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def updated_at @updated_at end |
#variable_definitions ⇒ Object (readonly)
Returns the value of attribute variable_definitions.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def variable_definitions @variable_definitions end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
270 271 272 |
# File 'lib/pictify/types.rb', line 270 def width @width end |