Rss feed

From Wikanual

Jump to: navigation, search

While the Api allows automatic addition of content to INTERDUBS read access to clips and files is being done via feeds. The same content can be accessed in various formats that are being documented here.

Contents

Feeds are based on logins

In INTERDUBS content is being published to the non-admin audience via a login. This concept also applies to feeds. A login points to a folder in the folder tree. Both feeds and web access for a login only see content that is in that folder downwards and where files are neither set to hide nor are not already part of expiring media.

Feeds are real time

Feeds in INTERDUBS are being created on fly - upon request. Changes in the content are being reflected in real time to all client views and feeds. There is no rendering delay etc.

Access to feeds via Edit Login

Each login automatically has corresponding feed URLs in various formats. These URLs are in the bottom of the

 edit login

under the

 logins


screen.

Types of feeds

All feeds are in XML format to facilitate interchange of content.

Depending on the purpose you can currently choose from the following feed formats:

iTunes links

INTERDUBS will list files with the filetype exensions mov, wmv, mp3 and m4a in the folder or any sub folder thereof. The format is one that iTunes will understand. But other media management tools that can deal with "RSS feeds with media enclosures" should be able to handle such feeds as well.

This is an example for such a feed: itpc://zQrqPH.www.interdubs.com/r/example/index.php?al=zQrqPH&xml4=1

always convert files in RSS for iPhone

If the configuration always convert files in RSS for iPhone is set then INTERDUBS will convert all clips for iPhone use and will display these URLs. As with the access via the actual device this will leave the original files un changed.

show folder name in RSS file title

INTERDUBS can display the name of the folder that the file is in in the comment section of the clip. Since the system will look for all files recursively and flatten the file name this info is helpful to identify which folder the file is in. Especially in a dailies situation this is helpful.

password protection

If the configuration for

require password and login/user name in client pages and feeds

is set then the feed will only be accessible if the user enters the user name and password.

This feature can be helpful when digital dailies are being distributed via a feed.

XML

The general XML format like http://www.interdubs.com/r/example/index.php?al=zQrqPH&xml5=1&iconsizeindex=3 can be used to dump the entire structure of a login. All files will be output. The folder structure of the login will be mapped and links to thumbnails will be displayed.

This is a list of the elements you can expect in an INTERDUBS XML feed:

title - the title of the file
md5 - the MD5 checksum of the file
ak - the 6 digit ak_code for the file in question
note - the [[Note]] for the file or folder
video_path - link to the video file if the file is a clip
image_path - link to the image file if it is an image
width - width in pixels of the file
height - height in pixels of the file
thumbnail_path - path to the thumbnail image, please see also thumbnail size below
fielsize - the size of the file in bytes
mtime - the modification time of the file (see time below) 
expiretime - optional paramater that expresses the time when the file expire (see time below)
runlength - optional length of a clip in seconds
tag - optional tags for a clip
comments

If you call the xml link with the paramenter comments=1 added as in http://www.interdubs.com/r/example/index.php?al=zQrqPH&xml5=1&iconsizeindex=3&comments=1 then the feed will also content the client comments for a given file. Each has the following values:

created - the epoch timestamp of the comment
author - whatever was entered in the "your name" field
private - 1 if the comment was not displayed on the site itself
timepoint - a float for the time in seconds if the comment is for a specific frame
content - the actual comment
thumbnail size

The size of the thumbnails returned can be specified in an additional parameter called

iconsizeindex


For details on the different thumbnail resolutions see INTERDUBS_for_Web_Designers#Thumbnail_sizes Noteworthy is the index 0 that will return the image that matches the clip / image size.

To use an icon size index of 4 ( 180 pixels wide) your link should contain:

iconsizeindex=4

as a parameter. For example:

http://www.interdubs.com/r/example/index.php?al=9tfj08&xml5=1&iconsizeindex=4
non standard character sets

By default INTERDUBS filters out non standard characters in titles to avoid problems in receiving software.

If the receiving system can handle those characters and you need to use them you disable this filter by setting

allchars

An example would be:

http://www.interdubs.com/r/example/index.php?al=9tfj08&xml5=1&iconsizeindex=4&allchars=1 

[there is no change in the output of this link]

time

Times in feeds are being expressed as seconds since January first 1970. Aka epoch time. Timezone settings are NOT being applied. The time is in PDT.

php example code

If you like to load a feed in php then you can do this with the following functions:

file_get_contents($theIDX_xml_feed); 
$xmlObj = simplexml_load_string( $xml1, null, LIBXML_NOCDATA );
print_r($xmlObj);

Media RSS (Yahoo MRSS)

While the goal of the XML feed is to supply a complete dump of all INTERDUBS information the Media RSS feeds are a format that is compatible with a growing number of players. An example for this feed is http://www.interdubs.com/mediarss/example/zQrqPH

Since INTERDUBS feeds are fully compliant the http://en.wikipedia.org/wiki/Media_RSS might be a good way to get detail information


Tag for lang flag

You can control the language tag of any item in the media feed via a tag.

The default is:

lang="en"


In order to change it you need to assign a tag to the file in question that has a complete language defintion. Like:


lang="en-GB"


Please note that lang=" and the leading " are necessary. Otherwise the system will continue to use the default.

Media RSS + iconsize

As an addition to the standard Yahoo Media RSS format INTERDUBS allows the control of the thumbnail size via a link like

http://www.interdubs.com/r/example/index.php?al=zQrqPH&mrss=1&iconsizeindex=3

See Icon_size for details.

Set Top Boxes

INTERDUBS set top boxes use a feed like structure to sync content.


parsing a feed with php

The following code snippet would use an INTERDUBS example feed and parse it in php:


<?php

#Reading an INTERDUBS feed with PHP
 
#size index for icons. 
#0 original
#1 75 pixels wide
#2 100 pixels wide
#3 140 pixels wide
#4 180 pixels wide
#5 240 pixels wide
#6 320 pixels wide
#7 400 pixels wide
$idx_iconsize = 3;

#if client and admin comments should be included in the feed
$idx_comments = 1;

$idx_feed = "http://www.interdubs.com/r/example/index.php?al=zQrqPH&xml5=1&iconsizeindex=${idx_iconsize}&comments=${idx_comments}";

#get the feed
$xml_string = file_get_contents($idx_feed);
#parse it into an object
$xml = new SimpleXMLElement($xml_string);
#print that object
print "<pre>";
print_r($xml);
print "</pre>";

?>
Personal tools