Atom Expiry

From RadioConnected
Jump to: navigation, search

Standard: http://tools.ietf.org/html/draft-snell-atompub-feed-expires-06
XML namespace: http://purl.org/atompub/age/1.0

Many feeds are only intended to be valid for a specific period of time. For example a list of the the 10 best most popular radio shows in any particular month will only be valid until the next list is published. Also, a radio show may only be available for a specified time period.

To address this problem The Internet Engineering Task Force ( [IETF]) released an internet draft which proposed two new extension elements for Atom that can be used to indicate either an exact time or a maximum age after which the metadata contained by the feed or entry expires.

In totallyradio this feature is used to indicate that an episode expires one month after publication, at which point it is archived and available to registered users only.


Examples of Atom Expiry

A feed whose content expires after 10 days


<feed xmlns="http://www.w3.org/2005/Atom"
      
       ATOM EXPIRY CODE 
      xmlns:fh="http://purl.org/syndication/history/1.0"
      xmlns:fa="|http://purl.org/atompub/age/1.0|">
      --------------------------------------------

  <title>My Movie Queue</title>
  <link href="http://www.example.com/movies"/>
  <link rel="self" href="http://www.example.com/movies/feed" />
  <updated>2005-12-12T12:00:00Z</updated>
  <author><name>James Snell</name></author>
  <id>tag:example.com,2005:movies</id>

       ATOM EXPIRY CODE
      --------------------------------------------
      <fh:incremental>false</fh:incremental>
      <fa:max-age>864000000</fa:max-age>
      --------------------------------------------

  <entry>
    <title>Hitchhiker's Guide to the Galaxy</title>
    <link href="..." />
    ...
  </entry>
  <entry>
    <title>Charlie Chaplin - City Lights</title>
    <link href="..." />
    ...
  </entry>
  <entry>
    <title>Buster Keaton - College</title>
    <link href="..." />
    ...
  </entry>
</feed>

A feed whose content expires at noon on December 22 2005




				
<feed xmlns="http://www.w3.org/2005/Atom"


      xmlns:fh="http://purl.org/syndication/history/1.0"
      xmlns:fa="|http://purl.org/atompub/age/1.0|">


  <title>My Movie Queue</title>
  <link href="http://www.example.com/movies"/>
  <link rel="self" href="http://www.example.com/movies/feed" />
  <updated>2005-12-12T12:00:00Z</updated>
  <author><name>James Snell</name></author>
  <id>tag:example.com,2005:movies</id>


  <fh:incremental>false</fh:incremental>
  <fa:expires>2005-12-22T12:00:00Z</fa:expires>


  <entry>
    <title>Hitchhiker's Guide to the Galaxy</title>
    <link href="..." />
    ...
  </entry>
  <entry>
    <title>Charlie Chaplin - City Lights</title>
    <link href="..." />
    ...
  </entry>
  <entry>
    <title>Buster Keaton - College</title>
    <link href="..." />
    ...
  </entry>
</feed>