Class: Animoto::Manifests::StoryboardUnbundling

Inherits:
Base
  • Object
show all
Defined in:
lib/animoto/manifests/storyboard_unbundling.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(options = {}) ⇒ StoryboardUnbundling

Creates a new storyboard unbundling manifest Unbundling a storyboard “rehydrates” the assets and directorial decisions associated with this project, allowing the video to be rendered even if the original storyboard or visual assets have expired or been deleted on Animoto’s servers since they were created the first time.

Parameters:

  • options (Hash{Symbol=>Object}) (defaults to: {})

Options Hash (options):

  • :bundle_url (String)

    the URL pointing to a storyboard bundle

  • :http_callback_url (String)

    a URL to receive a callback when this job is done

  • :http_callback_format (String)

    the format of the callback



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

def initialize options = {}
  super
  @bundle_url = options[:bundle_url]
end

Instance Attribute Details

#bundle_urlString

The URL to the storyboard bundle

Returns:

  • (String)


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

def bundle_url
  @bundle_url
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



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

def to_hash
  hash  = { 'storyboard_unbundling_job' => { 'storyboard_unbundling_manifest' => {} } }
  job   = hash['storyboard_unbundling_job']
  add_callback_information job
  manifest = job['storyboard_unbundling_manifest']
  manifest['bundle_url'] = bundle_url
  hash
end