API

The Feed Reader API is REST based, uses basic authentication and returns JSON. When authentication is required, the token can be passed as a query parameter instead ("?token=SOMETOKENHERE"). Please email me your feedback.

Tokens

POST /api/v1/:user/tokens

Authenticates a session. Accepts password as a parameter and returns an authentication token.

curl https://feedreader.co/api/v1/arpith/tokens --data "password=somepassword"

{ "success": true, "token": "fb8ac39f556118deef404bb7d0c0192f7d483759c348694d" }

DELETE /api/v1/:user/tokens

Revokes a session. Requires authentication.

curl -X DELETE https://feedreader.co/api/v1/arpith/tokens -u fb8ac39f556118deef404bb7d0c0192f7d483759c348694d:

{ "success": true }

Feeds

GET /api/v1/:user/feeds

Get all subscribed feeds. Returns a list of feed objects and articles not marked read.

curl https://feedreader.co/api/v1/arpith/feeds

{ "success": true, "feeds": [ { "title": "American Elf", "htmlUrl": "http://www.americanelf.com", "type": "rss", "lastModified": "undefined", "etag": "undefined", "key": "http://feeds.feedburner.com/AmericanElfRssFeed" } ], "articles": [] }

GET /api/v1/feeds/:xmlurl

Checks url for new articles and returns feed object with sorted list of article hashes.

curl https://feedreader.co/api/v1/feeds/http://feeds.feedburner.com/AmericanElfRssFeed -u fb8ac39f556118deef404bb7d0c0192f7d483759c348694d:

{ "title": "American Elf", "htmlUrl": "http://www.americanelf.com", "type": "rss", "lastModified": "undefined", "etag": "undefined", "success": true, "articles": [ "54eac3bad961867dfc67b659a027f0d4", "97bee92629ecf71804dc4505080c68da", "b3763bd521a5ef1c81443e1448cdc051" ] }

Labels

POST /api/v1/:user/labels/:label

Label an article. Accepts hash (required) and score (optional) as parameters. If score is not present, Date.now() is used to order the article within the label. Requires authentication.

curl https://feedreader.co/api/v1/arpith/labels/read --data "hash=cc5e5dcb16010782336e0e1a7e98395e" -u fb8ac39f556118deef404bb7d0c0192f7d483759c348694d:

{ "success": true }

GET /api/v1/:user/labels/:label

Get articles labelled with label.

curl https://feedreader.co/api/v1/arpith/labels/read -u fb8ac39f556118deef404bb7d0c0192f7d483759c348694d:

{ "success": true, "articles": [ "cc5e5dcb16010782336e0e1a7e98395e" ] }

GET /api/v1/:user/labels?hash=article_id

Get all labels used. If hash is passed as a parameter returns labels for the article.

curl https://feedreader.co/api/v1/arpith/labels?hash=8e8fb9307239c9b99daf2cf8eea510009d7cbcf2 -u fb8ac39f556118deef404bb7d0c0192f7d483759c348694d:

{ "success": true, "labels": [ "read" ] }

Folders

POST /api/v1/:user/folders/:folder

Add a feed to a folder. Accepts xmlurl as parameter. Requires authentication.

curl https://feedreader.co/api/v1/arpith/folders/Kochalka --data "xmlurl=http://feeds.feedburner.com/AmericanElfRssFeed" -u fb8ac39f556118deef404bb7d0c0192f7d483759c348694d:

{ "success": true }

DELETE /api/v1/:user/folders/:folder

Delete a feed from a folder. Accepts xmlurl as parameter and deletes the folder if it is now empty. Requires authentication.

curl https://feedreader.co/api/v1/arpith/folders/Kochalka -X DELETE --data "xmlurl=http://feeds.feedburner.com/AmericanElfRssFeed" -u fb8ac39f556118deef404bb7d0c0192f7d483759c348694d:

{ "success": true }

GET /api/v1/:user/folders/:folder

Get feeds in folder.

curl https://feedreader.co/api/v1/arpith/folders/Kochalka

{ "success": true, "feeds": [ "http://feeds.feedburner.com/AmericanElfRssFeed" ] }

GET /api/v1/:user/folders

Get all folders used. If xmlurl is passed as a parameter, returns folders the feed belongs to as well as all folders used.

curl https://feedreader.co/api/v1/arpith/folders?xmlurl=http://xkcd.com/atom.xml

{ "success": true, "folders": [ "Other" ], "allFolders": [ "Other" ] }

Articles

GET /api/v1/articles/:hash

Get an article from S3 via cloudfront. Note that the json is stripped, no "success".

curl https://feedreader.co/api/v1/articles/8e8fb9307239c9b99daf2cf8eea510009d7cbcf2

{ "title": "The Incident: The Music", "description": "The Incident: The Music:

For years now, Matt and I have been getting this question: when are you going to release the soundtrack from The Incident? Today, the singer/songwriter behind this wonderful, wonderful score has made it available for download.

\n

Hit up Cabel’s new blog and get the back story plus some bitchin’ tunes!

", "summary": "The Incident: The Music:

For years now, Matt and I have been getting this question: when are you going to release the soundtrack from The Incident? Today, the singer/songwriter behind this wonderful, wonderful score has made it available for download.

\n

Hit up Cabel’s new blog and get the back story plus some bitchin’ tunes!

", "date": "2012-11-12T21:49:48.000Z", "pubdate": "2012-11-12T21:49:48.000Z", "pubDate": "2012-11-12T21:49:48.000Z", "link": "http://mrgan.tumblr.com/post/35588576448", "guid": "http://mrgan.tumblr.com/post/35588576448", "author": null, "comments": null, "origlink": null, "image": {}, "source": {}, "categories": [], "enclosures": [], "rss:@": {}, "rss:title": { "@": {}, "#": "The Incident: The Music" }, "rss:description": { "@": {}, "#": "The Incident: The Music:

For years now, Matt and I have been getting this question: when are you going to release the soundtrack from The Incident? Today, the singer/songwriter behind this wonderful, wonderful score has made it available for download.

\n

Hit up Cabel’s new blog and get the back story plus some bitchin’ tunes!

" }, "rss:link": { "@": {}, "#": "http://mrgan.tumblr.com/post/35588576448" }, "rss:guid": { "@": {}, "#": "http://mrgan.tumblr.com/post/35588576448" }, "rss:pubdate": { "@": {}, "#": "Mon, 12 Nov 2012 13:49:48 -0800" }, "meta": { "#ns": [ { "xmlns:dc": "http://purl.org/dc/elements/1.1/" }, { "xmlns:atom": "http://www.w3.org/2005/Atom" } ], "@": [ { "xmlns:dc": "http://purl.org/dc/elements/1.1/" } ], "#content-type": "text/xml; charset=utf-8", "#type": "rss", "#version": "2.0", "title": "Neven Mrgan's tumbl", "description": "Missing vowels since before it was cool.", "date": null, "pubdate": null, "pubDate": null, "link": "http://mrgan.tumblr.com/", "xmlurl": null, "xmlUrl": null, "author": null, "language": null, "favicon": null, "copyright": null, "generator": "Tumblr (3.0; @mrgan)", "image": {}, "categories": [], "rss:@": {}, "rss:link": [ { "@": { "rel": "hub", "href": "http://tumblr.superfeedr.com/", "xmlns:atom": "http://www.w3.org/2005/Atom" } }, { "@": {}, "#": "http://mrgan.tumblr.com/" } ], "rss:description": { "@": {}, "#": "Missing vowels since before it was cool." }, "rss:title": { "@": {}, "#": "Neven Mrgan's tumbl" }, "rss:generator": { "@": {}, "#": "Tumblr (3.0; @mrgan)" } }, "hash": "8e8fb9307239c9b99daf2cf8eea510009d7cbcf2", "feedurl": "http://mrgan.tumblr.com/rss" } }