readr

Unofficial experimental Google Reader API for Java

License

License

GroupId

GroupId

me.shakiba.readr
ArtifactId

ArtifactId

readr
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

readr
Unofficial experimental Google Reader API for Java
Project URL

Project URL

http://github.com/shakiba/readr
Source Code Management

Source Code Management

http://github.com/shakiba/readr

Download readr

How to add to project

<!-- https://jarcasting.com/artifacts/me.shakiba.readr/readr/ -->
<dependency>
    <groupId>me.shakiba.readr</groupId>
    <artifactId>readr</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/me.shakiba.readr/readr/
implementation 'me.shakiba.readr:readr:0.1.0'
// https://jarcasting.com/artifacts/me.shakiba.readr/readr/
implementation ("me.shakiba.readr:readr:0.1.0")
'me.shakiba.readr:readr:jar:0.1.0'
<dependency org="me.shakiba.readr" name="readr" rev="0.1.0">
  <artifact name="readr" type="jar" />
</dependency>
@Grapes(
@Grab(group='me.shakiba.readr', module='readr', version='0.1.0')
)
libraryDependencies += "me.shakiba.readr" % "readr" % "0.1.0"
[me.shakiba.readr/readr "0.1.0"]

Dependencies

compile (6)

Group / Artifact Type Version
org.apache.httpcomponents : httpclient jar 4.2.1
org.scribe : scribe jar 1.3.3
com.google.code.gson : gson jar 2.2.2
com.google.guava : guava jar 14.0
org.slf4j : slf4j-api jar 1.7.2
org.slf4j : slf4j-log4j12 jar 1.7.2

test (1)

Group / Artifact Type Version
org.testng : testng jar 6.8

Project Modules

There are no modules declared in this project.

readr

Unofficial Google Reader API for Java

Usage

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(...);

Maven

Simply add it to your Maven project dependencies.

<dependency>
    <groupId>me.shakiba.readr</groupId>
    <artifactId>readr</artifactId>
    <version>0.1.0</version>
</dependency>

Credit/Acknowledgments

google-reader-api documentation has been extensively used.

A comprehensive documentation is also available here: http://undoc.in/googlereader.html

TODO

Test classes are incomplete.

Versions

Version
0.1.0