Syndication
===========

Current syndication functionality is provided using the Zope 2 
``fatsyndication`` product.

Lets begin by creating an video container with some video files.

  >>> id = folder.invokeFactory('Folder', 'video-container')
  >>> container = folder[id]
  >>> config = container.restrictedTraverse('@@video-config.html')
  >>> config.media_activated = True

  >>> id = container.invokeFactory('File', 'video-item-1')
  >>> item1 = container[id]
  >>> config = item1.restrictedTraverse('@@video-config.html')
  >>> config.media_activated = True

  >>> from p4a.video import interfaces
  >>> video = interfaces.IVideo(item1)
  >>> video.title = u'My Test Video'

Since some sample content has been configured we can now start testing
the syndication feeds.

  >>> feedview = container.restrictedTraverse('@@rss.xml')
  >>> feed = feedview.getFeed()
  >>> feed
  <p4a.plonevideo.syndication.VideoContainerFeed ...>

  >>> entries = feed.getFeedEntries()
  >>> len(entries)
  1
  >>> entries
  [<p4a.plonevideo.syndication.VideoFeedEntry ...>]

  >>> str(entries[0].getTitle())
  'My Test Video'
  >>> 'video-item-1' in entries[0].getWebURL()
  True
