This feature allows a user to see all the feeds that they are filtering: useful if they just want to look at a specific feed or if they want to manage their feeds, e.g. by deleting one. If you’re interested you can read the original feature spec, though we haven’t implemented this in full (see comments).
The API call is an HTTP GET on [sux0rURL]/api/feeds/ (where [sux0rURL] is the URL for your sux0r installation, for this project that is http://icbl.macs.hw.ac.uk/sux0rAPI/icbl/ ). The only parameter you can use is user= to specify the user name.
So if you wanted to see the feeds that I have subscribed to you would GET http://icbl.macs.hw.ac.uk/sux0rAPI/icbl/api/feeds/?user=philb which would return something like
<?xml version="1.0"?> <rss version="2.0" xmlns:api="http://icbl.macs.hw.ac.uk/sux0rAPI/api/xmlns" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>Philb's RSS Feeds</title> <link>http://icbl.macs.hw.ac.uk/sux0r206/user/profile/philb</link> <description>Use Case: Return the RSS Feeds for a User. User Nickname: philb</description> <atom:link href="http://icbl.macs.hw.ac.uk/sux0rAPI/icbl/api/feeds/?user=philb" rel="self" type="application/rss+xml" /> <item> <title>OUseful.Info, the blog...</title> <link>http://feeds.feedburner.com/ouseful</link> <guid>50</guid> <description>Thinking differently...</description> </item> <item> <title>Lorcan Dempsey's weblog</title> <link>http://orweblog.oclc.org/atom.xml</link> <guid>57</guid> <description>On libraries, services and networks.</description> </item> <!--snip--> <item> <title>ehabitus</title> <link>http://ehabitus.blogspot.com/feeds/posts/default</link> <guid>53</guid> <description>(n). "e" + "a system of dispositions (unarticulated, habitual, acquired patterns of perception, thought and action)"</description> </item> </channel> </rss>
i.e. an RSS feed where the items provide information on the feeds to which I am subscribed.
Why an RSS feed? Well, we have the code return information in RSS feeds so why not? A simple extension would be to allow a parameter that would let one specify the format of the results, with OPML being the obvious alternative.
You’ll see that we’ve used the guid element to return the identifier used by sux0r for the feed (OK, we’re stretching the definition the “gu” part of guid). This can be used as the feed_id to identify the feed in other API calls, for example to return the items in that feed.
A PUT or POST (not sure which yet) to the same URL base would be a way of adding feeds.
Another extension would be to make the user parameter optional, returning information on all feeds in the system if no user name is provided–this could be useful for some admin functions.
Unfortunately we haven’t been able to implement the error codes properly on our server, you get an HTTP status code of 200-OK whether or not it is. However if you specify an invalid user name you do get sensible error messages returned in the body.
Even more unfortunately, the current implementation does not cover the authentication requirements.