Class: Animoto::Resources::Jobs::DirectingAndRendering
- Defined in:
- lib/animoto/resources/jobs/directing_and_rendering.rb
Instance Attribute Summary collapse
-
#storyboard ⇒ Resources::Storyboard
readonly
A Storyboard object for this job.
-
#storyboard_url ⇒ String
readonly
The URL for the storyboard created for this job.
-
#stream_url ⇒ String
readonly
If available, the URL where the video can be watched ‘live’ via HTTP Live Streaming.
-
#video ⇒ Resources::Video
readonly
A Video object for this job.
-
#video_url ⇒ String
readonly
The URL for the video created.
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)
A Storyboard object for this job.
25 26 27 |
# File 'lib/animoto/resources/jobs/directing_and_rendering.rb', line 25 def storyboard @storyboard end |
#storyboard_url ⇒ String (readonly)
The URL for the storyboard created for this job. This storyboard can be used into future rendering jobs to produce different formats, resolutions, etc.
21 22 23 |
# File 'lib/animoto/resources/jobs/directing_and_rendering.rb', line 21 def storyboard_url @storyboard_url end |
#stream_url ⇒ String (readonly)
this attribute may not be available when this job is 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.
45 46 47 |
# File 'lib/animoto/resources/jobs/directing_and_rendering.rb', line 45 def stream_url @stream_url end |
#video ⇒ Resources::Video (readonly)
this object may not have all the most recent attributes, namely the download_url attribute. Use Client#reload! to update the object.
A Video object for this job.
38 39 40 |
# File 'lib/animoto/resources/jobs/directing_and_rendering.rb', line 38 def video @video end |
#video_url ⇒ String (readonly)
The URL for the video created. Note that this is for the video resource and not the URL to the actual video file (though requesting the resource will give you the URL to the file).
31 32 33 |
# File 'lib/animoto/resources/jobs/directing_and_rendering.rb', line 31 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/directing_and_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::DirectingAndRendering
49 50 51 52 53 54 55 56 |
# File 'lib/animoto/resources/jobs/directing_and_rendering.rb', line 49 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 |