Class: Animoto::Resources::Jobs::Rendering
- Defined in:
- lib/animoto/resources/jobs/rendering.rb
Instance Attribute Summary collapse
-
#storyboard ⇒ Resources::Storyboard
readonly
The Storyboard this job will render a video from.
-
#storyboard_url ⇒ String
readonly
The URL to the storyboard resource.
-
#stream_url ⇒ String
readonly
If available, the URL where the video can be watched ‘live’ via HTTP Live Streaming.
-
#video ⇒ Resources::Video
readonly
The Video created by this job.
-
#video_url ⇒ String
readonly
The URL to the video resource.
Attributes inherited from Base
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#completed?, endpoint, #failed?, infer_content_type, infer_endpoint, #pending?
Methods inherited from Base
endpoint, #endpoint, #initialize, #load, load, new, original_new, register
Methods included from Support::StandardEnvelope
Constructor Details
This class inherits a constructor from Animoto::Resources::Base
Instance Attribute Details
#storyboard ⇒ Resources::Storyboard (readonly)
The Storyboard this job will render a video from.
19 20 21 |
# File 'lib/animoto/resources/jobs/rendering.rb', line 19 def storyboard @storyboard end |
#storyboard_url ⇒ String (readonly)
The URL to the storyboard resource.
23 24 25 |
# File 'lib/animoto/resources/jobs/rendering.rb', line 23 def storyboard_url @storyboard_url end |
#stream_url ⇒ String (readonly)
this attribute may not be available when the job is first created. If you poll the job while it’s rendering, the URL will appear when the stream is available to view.
If available, the URL where the video can be watched ‘live’ via HTTP Live Streaming.
40 41 42 |
# File 'lib/animoto/resources/jobs/rendering.rb', line 40 def stream_url @stream_url end |
#video ⇒ Resources::Video (readonly)
The Video created by this job.
27 28 29 |
# File 'lib/animoto/resources/jobs/rendering.rb', line 27 def video @video end |
#video_url ⇒ String (readonly)
This URL points to the video resource and not the actual video file.
The URL to the video resource.
33 34 35 |
# File 'lib/animoto/resources/jobs/rendering.rb', line 33 def video_url @video_url end |
Class Method Details
.unpack_standard_envelope(body) ⇒ Hash{Symbol=>Object}
8 9 10 11 12 13 14 15 |
# File 'lib/animoto/resources/jobs/rendering.rb', line 8 def self.unpack_standard_envelope body links = unpack_links(body) super.merge({ :storyboard_url => links['storyboard'], :video_url => links['video'], :stream_url => links['stream'] }) end |
Instance Method Details
#instantiate(attributes = {}) ⇒ Jobs::Rendering
44 45 46 47 48 49 50 51 |
# File 'lib/animoto/resources/jobs/rendering.rb', line 44 def instantiate attributes = {} @storyboard_url = attributes[:storyboard_url] @storyboard = Animoto::Resources::Storyboard.new(:url => @storyboard_url) if @storyboard_url @video_url = attributes[:video_url] @video = Animoto::Resources::Video.new(:url => @video_url) if @video_url @stream_url = attributes[:stream_url] super end |