intertwingly

It’s just data

What’s SUP?


Paul Buchheit: You can see SUP <link> elements in FriendFeed’s Atom feeds (e.g., http://friendfeed.com/paul?format=atom), and you can see FriendFeed’s SUP feed at http://friendfeed.com/api/sup.json.

Excellent!  I took a look with the thought of updating the feedvalidator to support this, but it turns out that there was nothing to be done.  As Col. John “Hannibal” Smith would say, “I love it when a plan comes together”.

Here’s the link element from the feed:

<link rel="http://api.friendfeed.com/2008/03#sup" href="http://friendfeed.com/api/sup.json#53924729" type="application/json"/>

The sup_id appears as the fragment identifier in the atom:link/@href, but looking into the source, I see some thought has been given to providing this for any HTTP resource via a HTTP header, thus:

X-SUP-ID: http://mysite.com/sup.json#12345

The document it points to looks something like the following once pretty-printed:

{"available_periods": {60: "http://friendfeed.com/api/sup.json?seconds=60",
                       300: "http://friendfeed.com/api/sup.json?seconds=300",
                       600: "http://friendfeed.com/api/sup.json?seconds=600"},
 "period": 60,
 "since_time": "2008-08-29T17:37:57Z",
 "update_time": "2008-08-29T17:39:07Z",
 "updates": [["4762d33f", "08tCo"], ["100994c2", "08tCs"], ... ]}

Updates is a simple array of sup_ids and update_ids, where update_id fullfills a role analogous to an ETag.