Skip to content

Instantly share code, notes, and snippets.

@svperfecta
Last active January 21, 2016 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save svperfecta/141e7c1ae1e610c9cdcd to your computer and use it in GitHub Desktop.
Save svperfecta/141e7c1ae1e610c9cdcd to your computer and use it in GitHub Desktop.
Example Event RSS Feed

Feed will support xcal (xml representation of ical). This allows us to handle event schedules (PBR) in a nice way

Feed will also support the media rss spec as part of our RSS parsing. This allows a nice way to provide links to assets (images, video, etc) within the rss feed in a standardized way.

Both of these require the tag to add additional XML namespaces (xmlns:media, xmlns:xcal).

These are used within an RSS feed like so:

<?xml version="1.0"?>
<rss version="2.0"
    xmlns:xcal="urn:ietf:params:xml:ns:xcal"
    xmlns:media="http://search.yahoo.com/mrss/"
>
    <channel>
        <title>Live Stream - Schedule</title>
        <link>http://pbr.com/en/bfts/schedule.aspx</link>
        <description>Professional Bull Riders - BFTS</description>
        <language>en-us</language>
        <lastBuildDate>Fri, 06 Jul 2015 09:39:21 EDT</lastBuildDate>
        <docs>http://www.rssboard.org/rss-2-0-9</docs>
        <generator>pbr.com</generator>
        <item>
            <title>Chicago Invitational</title>
            <guid>theooyalaassetid</guid>
            <source>ooyala</source>
            <description>Allstate Arena</description>
            <media:content
              url = "http://server/image1.jpg"
              type = "image/jpeg"
              medium = "image">
            </media:content>
            <xcal:dtstart>2015-01-09T18:50:00Z-0600</xcal:dtstart>
            <xcal:dtend>2015-01-10T13:50:00Z-0600</xcal:dtend>
        </item>
    </channel>
</rss>

Note: Image should be 16x9, and will be cooreced into 16x9 if not correct.

An exampe calendar item:

<item>
            <title>Chicago Invitational</title>
            <guid>theooyalaassetid</guid>
            <source>ooyala</source>
            <description>Allstate Arena</description>
            <media:content
              url = "http://server/image1.jpg"
              type = "image/jpeg"
              medium = "image">
            </media:content>
            <xcal:dtstart>2015-01-09T18:50:00Z-0600</xcal:dtstart>
            <xcal:dtend>2015-01-10T13:50:00Z-0600</xcal:dtend>
</item>

Here is the xCal spec Here an example of using xcal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment