-
Notifications
You must be signed in to change notification settings - Fork 294
API Specification
This document attempts to describe the goread API. It is designed for mobile and other apps for use beyond the web client.
Goread runs on App Engine and uses Google's authentication. Refer to this article for some accurate but old information about how to authorize. Also see the goread android client's authorization implementation.
There are three main API calls used:
- Fetch unread items and feed data
- Fetch item contents
- Mark items read
All exchange done as JSON.
Used to fetch the user's OPML (feed and folder layout), unread items, and feed information (like icon URLs).
url: /user/list-feeds
Takes no arguments. Returns object with the following keys (keys not listed here are used by the web client and can be ignored):
-
Opml: an array of Outline objects. These objects are either a feed or another Outline with a list of feeds. If it is a feed, the
Outline
property will be populated with an array of Outlines and theTitle
property will be set to the folder name. If it is a feed, theXmlUrl
andHtmlUrl
properties will be set.XmlUrl
is the feed URL,HtmlUrl
is the feed's homepage URL. -
Stories: an object of with keys as feed
XmlUrl
s and values as arrays of Story objects, which are the unread feed items. A Story contains an Id, Title, Link, Created date, and content Summary. Feeds with no unread items are still in this array, but have an empty array as their value. - Feeds: an array of Feed objects. A Feed object has a Url, Title, Checked date, NextUpdate date, Errors count (> 0 if this feed is currently experiencing update errors), and a 16x16 Image icon URL.
url: /user/get-contents
Takes a request payload as a list of objects. The objects have a Feed
property as the XmlUrl
of the feed, and a Story
property as the Id
of the story item. For example:
[{"Feed":"http://feeds.arstechnica.com/arstechnica/everything","Story":"http://arstechnica.com/?p=400263"},
{"Feed":"http://feeds.arstechnica.com/arstechnica/everything","Story":"http://arstechnica.com/?p=402993"}]
It returns an array of strings which are the story item contents in the same order as the request.
Used to mark unread items as read. There is no API call to mark all read.
url: /user/mark-read
Takes the same parameters as /user/get-contents
, but returns nothing.