Class: Pictify::VideoTemplate

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_atObject (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_framesObject (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

#fpsObject (readonly)

Returns the value of attribute fps.



270
271
272
# File 'lib/pictify/types.rb', line 270

def fps
  @fps
end

#heightObject (readonly)

Returns the value of attribute height.



270
271
272
# File 'lib/pictify/types.rb', line 270

def height
  @height
end

#kindObject (readonly)

Returns the value of attribute kind.



270
271
272
# File 'lib/pictify/types.rb', line 270

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



270
271
272
# File 'lib/pictify/types.rb', line 270

def name
  @name
end

#poster_urlObject (readonly)

Returns the value of attribute poster_url.



270
271
272
# File 'lib/pictify/types.rb', line 270

def poster_url
  @poster_url
end

#rawObject (readonly)

Returns the value of attribute raw.



270
271
272
# File 'lib/pictify/types.rb', line 270

def raw
  @raw
end

#statusObject (readonly)

Returns the value of attribute status.



270
271
272
# File 'lib/pictify/types.rb', line 270

def status
  @status
end

#uidObject (readonly)

Returns the value of attribute uid.



270
271
272
# File 'lib/pictify/types.rb', line 270

def uid
  @uid
end

#updated_atObject (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_definitionsObject (readonly)

Returns the value of attribute variable_definitions.



270
271
272
# File 'lib/pictify/types.rb', line 270

def variable_definitions
  @variable_definitions
end

#widthObject (readonly)

Returns the value of attribute width.



270
271
272
# File 'lib/pictify/types.rb', line 270

def width
  @width
end