API Documentation Download

URL: http://heywatch.com/download

The Download resource replace the Discover one and works exactly the same!

Actions

Example response in XML: http://heywatch.com/download.xml [GET]

<downloads>
  <download>
    <status>finished</status>
    <updated-at>Fri Oct 27 14:26:18 CEST 2006</updated-at>
    <video-id>524</video-id>
    <title>YouTube - Rube Goldberg Officeplace Contraption</title>
    <error-msg></error-msg>
    <url>http:// host.com/videos/fun.avi</url>
    <id>79</id>
    <progress percent="100" current_length="2109"/>
    <length>2109</length>
    <created-at>Fri Oct 27 14:26:11 CEST 2006</created-at>
  </download>
</downloads>

Valid parameters for POST

  • url: direct link of the video / YouTube URL to download, escaped format needed

Optional parameters

  • title: title of the video about to be downloaded. Work only if passed download argument (not necessary)
  • ping_url_after_transfer: override the global option
  • ping_url_if_error: override the global option
  • custom fields: if you activate the ping after transfer, you will receive the custom fields in the request

Optional job parameters

  • automatic_encode: if “false”, the video will not be encoded automatically, even if you set the automatic encode option in your account page.
  • format_id: the format ID to use to convert the video. Override the default format option. Work only if you pass automatic_encode=true in the request.
  • max_length: length in second. If you don’t want your users upload 45min of video
  • All optional parameters from Job resource

If you set the ping urls in your account and decide to not override them in the request, the custom fields will be added at the end of the url to ping.

If you set the ping urls in your account and decide to not override them in the request, the custom fields will be added at the end of the url to ping.

Encoding in multiple format

You can now encode the video to download in multiple format in only one request.

format_id, ftp_directive, s3_directive and http_upload_directive can take multiple values separated by ”,”. So let’s say you want to encode the video in flash flv (id=31) and mp4 (id=175) and send the 2 encoded videos to different ftp:

  • format_id=31,175
  • ftp_directive=ftp://u:p@host.com/videos/flv,ftp://u:p@host.com/videos/mp4

The flv video will go to ftp://u:p@host.com/videos/flv and the mp4 one to ftp://u:p@host.com/videos/mp4.

Note: Order is important!


Powered by JunebugWiki v0.0.18 Last edited by bruno on June 23, 2010 06:51 PM (diff)
Version 12 (current) «olderversions