Upload a video to the video sites.
Title of the video
Description of the video
Tags of the video. Minimum is 2 tags
Category of the video. Can be 'Auto & vehicles', 'Comedy', 'Entertainment', 'Film & Animation', 'Gadgets & Games', 'Howto & DIY', 'Music', 'News & Politics', 'People & Blogs', 'Pets & Animals', 'Sports', 'Travel & Places'
The video object file (multipart form required)
The URL of a video. Can be a direct link, YouTube or Google link.
Eg. http://myhost.com/videos/1234.avi
Eg. http://youtube.com/watch?v=1dsfsd4_ds
The value must be login:password.
If you saved your credentials, you don't need to submit the credentials here unless you want to use another account. You can add many site credentials at once.
Eg. youtube=ytlogin:ytpassword
Eg. youtube=ytlogin:ytpassword&google=google@gmail.com:googlepassword&revver=...&...
When the job is done, you will receive all the links and errors to this ping address. See Ping page for more information.
Eg. http://myhost.com/ping/heyspread.php
URL of a logo (.png) to overlay on the video
This is the logo position. Can be "topleft" or "bottomright". Default is "topleft"
if "true", the video will be encoded in a standard format before being uploaded. This is to avoid format incompatibility with video sites.
if "true", the video will have statistics enabled.
You will receive all the video links at this address.
curl \ -F "file=@/home/user/myvideo.avi" \ -F "title=testing" \ -F "category=Entertainment" \ -F "tags=heyspread testing" \ -F "description=Just for testing the Hey!Spread API" \ -F "youtube=demoheyspread:mypasswd" \ -F "google=demoheyspread@gmail.com:mypasswd" \ -F "api_key=75b5744011e2dddbf2261e157505958b" \ --url "http://heyspread.com/api2/video"
video = HeySpread::Video.new( :title => "testing", :category => "Entertainment", :tags => "heyspread testing", :description => "Just for testing the Hey!Spread API", :file => "/home/user/myvideo.avi" ) video.destinations["youtube"] = ["demoheyspread", "mypasswd"] video.destinations["google"] = ["demoheyspread@gmail.com", "mypasswd"] video.upload
$video = new HeySpread_Video(array(
"title" => "testing",
"category" => "Entertainment",
"tags" => "heyspread testing",
"description" => "Just for testing the Hey!Spread API",
"file" => "/home/user/myvideo.avi"
));
$video->destinations["youtube"] = array("demoheyspread", "mypasswd");
$video->destinations["google"] = array("demoheyspread@gmail.com", "mypasswd");
$video->upload();
200 OK
<video>
<id>556</id>
<title>testing</title>
<description>Just for testing the Hey!Spread API</description>
<category>Entertainment</category>
<tags>heyspread testing</tags>
<created-at>Wed May 07 18:34:09 +0200 2008</created-at>
<updated-at>Fri May 09 19:07:29 +0200 2008</updated-at>
<status>uploading</status>
<stat>false</stat>
<uploads>
<upload site="google" time-left="00:01:14" percent="50" transferred="3400" total="6800" speed="121" />
<upload site="youtube" time-left="00:00:28" percent="75" transferred="5100" total="6800" speed="408" />
</uploads>
<links>
</links>
<errors>
</errors>
</video>
See GET /video for more information.
400 Bad Request
<errors> <error>Title can't be blank</error> </errors>