Sha256: c2f89d6f137c363bcd75a1fe935cc4d6cbd4c6b265a9d563104015a3db6ca5b7

Contents?: true

Size: 1.59 KB

Versions: 12

Compression:

Stored size: 1.59 KB

Contents

module Animoto
  module Manifests
    class StoryboardBundling < Animoto::Manifests::Base
      
      # The storyboard to be bundled
      # @return [Resources::Storyboard]
      attr_accessor :storyboard
      
      # 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.
      #
      # @param [Resources::Storyboard] storyboard the storyboard to bundle
      # @param [Hash{Symbol=>Object}] options
      # @option options [String] :http_callback_url a URL to receive a callback when this job is done
      # @option options [String] :http_callback_format the format of the callback
      def initialize *args
        options = args.last.is_a?(Hash) ? args.pop : {}
        super(options)
        @storyboard = args.shift
      end
      
      # Returns a representation of this manifest as a Hash.
      #
      # @return [Hash{String=>Object}] this manifest as a Hash
      # @raise [ArgumentError] if a callback URL is specified but not the format
      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
      
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
animoto-1.5.6 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.5.5 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.5.4 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.5.3 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.5.2 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.5.1 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.5.0 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.3.1 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.3.0 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.2.0 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.1.1 ./lib/animoto/manifests/storyboard_bundling.rb
animoto-1.1.0 ./lib/animoto/manifests/storyboard_bundling.rb