README.md in animoto-0.0.0.alpha7 vs README.md in animoto-0.0.0.alpha8
- old
+ new
@@ -112,11 +112,10 @@
# Send the manifest to the API. Your app will be notified of
# completion/failure via an HTTP POST to
# "http://mysite.com/animoto_callback"
client.direct_and_render!(manifest)
-
### A basic example using the Ruby client
This example shows how to separately direct a storyboard and render a video
with that storyboard. It also demonstrates how to use polling to check on job
status.
@@ -127,20 +126,20 @@
# Create a new client using our application key and secret
client = Client.new("application_key", "secret")
# Create a directing manifest. The directing manifest controls the images
# and other visual elements that will be in our final video.
- manifest = DirectingManifest.new(:title => "Amazing Title!", :producer => "Fishy Joe")
+ manifest = DirectingManifest.new(:title => "Amazing Title!")
# Add some images, text, and footage to our manifest.
manifest << Image.new("http://website.com/picture.png")
manifest << Image.new("http://website.com/hooray.png", :spotlit => true)
manifest << TitleCard.new("Woohoo!", "Hooray for everything!")
manifest << Footage.new("http://website.com/movie.mp4", :duration => 3.5)
# Setup the soundtrack.
- manifest << Song.new("http://website.com/song.mp3", :artist => "Fishy Joe")
+ manifest << Song.new("http://website.com/song.mp3")
# Request a new directing job by sending the API our directing manifest.
directing_job = client.direct!(manifest)
# Poll the service until the directing job is done.
@@ -167,10 +166,11 @@
end
# If the job has a video associated with it, everything worked out ok.
if video = rendering_job.video
# Print a link to download the video file.
- puts video.url
+ client.reload!(video)
+ puts video.download_url
else
# Something happened during rendering...
raise rendering_job.errors.first
end
else