Sha256: f237387e2807e2f3c5d2e1fb717adc383e4c9fd8262bd48a364d629fdfae3a32

Contents?: true

Size: 745 Bytes

Versions: 10

Compression:

Stored size: 745 Bytes

Contents

module Animoto
  class RenderingJob < Animoto::Job
    
    endpoint '/jobs/rendering'

    def self.unpack_standard_envelope body
      super.merge({
        :storyboard_url => body['response']['payload'][payload_key]['links']['storyboard'],
        :video_url      => body['response']['payload'][payload_key]['links']['video']
      })
    end
    
    attr_reader :storyboard, :storyboard_url, :video, :video_url
    
    def instantiate attributes = {}
      @storyboard_url = attributes[:storyboard_url]
      @storyboard = Animoto::Storyboard.new(:url => @storyboard_url) if @storyboard_url
      @video_url = attributes[:video_url]
      @video = Animoto::Video.new(:url => @video_url) if @video_url
      super
    end
        
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
animoto-0.0.0.alpha9 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha8 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha7 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha6 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha5 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha4 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha3 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha2 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha1 ./lib/animoto/rendering_job.rb
animoto-0.0.0.alpha0 ./lib/animoto/rendering_job.rb