Unofficial Google Reader API for Java
There is a class for each request type and there are two global request super type: API0 and Atom. You can view list of currently available API0 requests and Atom requests.
To execute a request first you need to create a new request object and provide required and optional parameters.
StreamContent req = new StreamContent(StreamId.feed("http://example.com/rss"));
To execute it you need a connection. There are two type of connections: simple and authenticated. Some requests require authenticated connection to be executed.
ApacheHttpClient4Connection simpleConn = new ApacheHttpClient4Connection(2);
// or
OAuthSribeConnection oauthConn = new OAuthSribeConnection(...);
Then to execute it:
Api0Stream stream = req.execute(simpleConn);
Returned objects contain API responses mapped to Java classes and fields:
public class Api0Stream {
public String direction;
public StreamId id;
public String title;
public String description;
public String continuation;
public List<Api0Link> self;
public List<Api0Link> alternate;
public long updated;
public List<Api0Item> items;
}
Common requests parameters are encapsulated in param-set classes and are added to request classes as public final fields:
req.psStream.setContinuation(...);
Simply add it to your Maven project dependencies.
<dependency>
<groupId>me.shakiba.readr</groupId>
<artifactId>readr</artifactId>
<version>0.1.0</version>
</dependency>
google-reader-api documentation has been extensively used.
A comprehensive documentation is also available here: http://undoc.in/googlereader.html
Test classes are incomplete.