Zideo API
- Retrieve video data
- Retrieve channel data
- Authorize users
- Post video data (Authentication needed)
Zideo API Table of Contents
Zideo Data API
The Zideo video sharing site allows Web application developers to access public content through its developer API.
The SimpleXML extension in PHP is ideal for processing the XML feeds generated by this API and using them to build customized PHP applications.
This article introduces the Zideo Data API, demonstrates how you can use it to browse user-generated video content;
access video metadata and perform keyword searches.
Feed URL http://www.zideo.nl/api
Variables :
- channel - contains the channel ID
- partner - contains the partner ID or Username
- search - contains the search string
- limit - contains the number of results (max 1000 per feed)
- start - contains the start page of the feed (not yet implemented)
- orderby - contains the order of the feed (views, rating, date)
- config - (for zideo corporate users) contains the player / config ID
- zideo & playzideo - contains the video id
- height - default height of the player
- width - default width of the player
- action = channel - retreives channeldata (username optional)
-
Example 1:
http://www.zideo.nl/api?partner=hotspods&orderby=date&limit=10 -
Example 2:
http://www.zideo.nl/api?channel=6d596556&orderby=date&limit=10 -
Example 3:
http://www.zideo.nl/api?search=dog&orderby=views&limit=10 -
Example 4:
http://www.zideo.nl/api?zideo=6c594b546d513d3d&playzideo=6c34655a6e46673d -
Example 5 Retreiving channel data:
http://www.zideo.nl/api?action=channel&partner=greenpeace
Zideo post API
The Zideo post API ables confirmed API users post video data on the zideo network. To start with the post API contact Zideo to register your api and retreive the API keys.
Registration of the API
Zideo have to confirm the API and creates a API Key / API Secret for your application .
To create the API Key we need the following information :
- Api Name
- Ip range min IP // max IP wherefrom the API connects
- Development email address
Zideo Authencation service
The Zideo Authentication is based on Open Auth. For each user 2 tokens are created. So the user will be able to cancel the connection between the api and Zideo. And the users passwords are not stored on the api's server.
Authenticating the user and receiving the tokens
To authenticate the user the user have to login on the Authentication area of Zideo.
After a successful login the authencation area redirects the header with the 2 created tokens.
The authentication service can be approached from :
http://www.zideo.nl/api/auth?apiKey=[apiKey]&redirect =[redirectUrl]
parameters
[apiKey] = the apiKey provided by Zideo
[redirectUrl] = the url that catches the two created tokens.
Example redirect url
http://www.yoursite.com?token1=[token1]&token2=[token2]&username=[username]
Posting video data
To post a video post a HTTP-POST with the encoding type "multipart/form-data" on the following URL.
http://www.zideo.nl/api
The following parameters have to be posted
- apiKey (required)
- apiSecret (required)
- token1 (required)
- token2 (required)
- title (required)
- description (optional)
- tags (optional separated by spaces)
- file (required)
- category (optional)
- channel[] (array with keys) -> channel_id (see data api)
After a succesful upload the system returns a XML with the metadata of the video.
The following categories are used by Zideo.
Entertainment and art: 6d596f3d
Cars & Vehicles: 6d6f453d
Animals: 6d6f493d
Film & TV: 6d6f513d
Fun & Entertainment: 6d6f553d
Informative: 6d6f593d
Music: 6d6f633d
Events: 6d6f673d
News: 6d6f6b3d
Vacation & Travel: 6d6f6f3d
Sports & Games: 6d34453d
Brand Channel: 6d34493d
Gadgets: 6d344d3d
Example PHP Curl
$fullfilepath = 'C:\Downloads\video.flv'; $upload_url = 'http://www.zideo.nl/api/'; $params = array( 'apiKey'=>"[apiKey]", 'apiSecret'=>"[apiSecret]", 'token1'=>"[token1]", 'token2'=>"[token2]", 'title'=>"[title]", 'description'=>"[description]", 'tags'=>"[tags]", 'file'=>"[file]", 'category'=>"[category]" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_URL, $upload_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); $response = curl_exec($ch); curl_close($ch); echo $response;
