Sha256: d5e341562c662520f6b5f502004815dae13627e985dea6e25c2353a8c37cf1d7

Contents?: true

Size: 689 Bytes

Versions: 10

Compression:

Stored size: 689 Bytes

Contents

module Animoto
  class Storyboard < Animoto::Resource
    
    def self.unpack_standard_envelope body = {}
      super.merge({
        :duration => body['response']['payload'][payload_key]['metadata']['duration'],
        :visuals_count => body['response']['payload'][payload_key]['metadata']['visuals_count'],
        :preview_url => body['response']['payload'][payload_key]['links']['preview']
      })
    end
    
    attr_reader :duration, :visuals_count, :preview_url
    
    def instantiate attributes = {}
      @duration = attributes[:duration]
      @visuals_count = attributes[:visuals_count]
      @preview_url = attributes[:preview_url]
      super
    end
        
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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