Class: Animoto::Manifests::StoryboardBundling

Inherits:
Base
  • Object
show all
Defined in:
lib/animoto/manifests/storyboard_bundling.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#http_callback_format, #http_callback_url, #partner_metadata

Instance Method Summary collapse

Methods inherited from Base

#associated_job_class, associated_job_class, infer_content_type

Methods included from Support::ContentType

included

Constructor Details

#initialize(*args) ⇒ StoryboardBundling

Creates a new storyboard bundling manifest. A storyboard bundle is a archive of the assets and directorial decisions associated with this project. Once a storyboard is bundled, if the original storyboard on Animoto’s servers expires or is deleted, the storyboard can be reconstructed from the bundle and the video can be rendered.

Parameters:



19
20
21
22
23
# File 'lib/animoto/manifests/storyboard_bundling.rb', line 19

def initialize *args
  options = args.last.is_a?(Hash) ? args.pop : {}
  super(options)
  @storyboard = args.shift
end

Instance Attribute Details

#storyboardResources::Storyboard

The storyboard to be bundled



7
8
9
# File 'lib/animoto/manifests/storyboard_bundling.rb', line 7

def storyboard
  @storyboard
end

Instance Method Details

#to_hashHash{String=>Object}

Returns a representation of this manifest as a Hash.

Returns:

  • (Hash{String=>Object})

    this manifest as a Hash

Raises:

  • (ArgumentError)

    if a callback URL is specified but not the format



29
30
31
32
33
34
35
36
# File 'lib/animoto/manifests/storyboard_bundling.rb', line 29

def to_hash
  hash  = { 'storyboard_bundling_job' => { 'storyboard_bundling_manifest' => {} } }
  job   = hash['storyboard_bundling_job']
  add_callback_information job
  manifest = job['storyboard_bundling_manifest']
  manifest['storyboard_url'] = storyboard.url if storyboard
  hash
end