Sha256: b28b767a10a17cb8294761e491fd5abd7de399e042dfe3bde9bfd2555ec3e5e0
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
module Animoto class Video < Animoto::Resource def self.unpack_standard_envelope body super.merge({ :download_url => body['response']['payload'][payload_key]['links']['download'], :storyboard_url => body['response']['payload'][payload_key]['links']['storyboard'], :duration => body['response']['payload'][payload_key]['metadata']['duration'], :format => body['response']['payload'][payload_key]['metadata']['format'], :framerate => body['response']['payload'][payload_key]['metadata']['framerate'], :resolution => body['response']['payload'][payload_key]['metadata']['vertical_resolution'] }) end attr_reader :download_url, :storyboard_url, :storyboard, :duration, :format, :framerate, :resolution def instantiate attributes = {} @download_url = attributes[:download_url] @storyboard_url = attributes[:storyboard_url] @storyboard = Animoto::Storyboard.new(:url => @storyboard_url) if @storyboard_url @duration = attributes[:duration] @format = attributes[:format] @framerate = attributes[:framerate] @resolution = attributes[:resolution] super end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
animoto-0.0.0.alpha1 | ./lib/animoto/video.rb |
animoto-0.0.0.alpha0 | ./lib/animoto/video.rb |