Yet Another Goodreads Android Api

library to ease interaction with goodreads, based off Jade Mason's yagrac

How to Use

  • Get a Developer Key from goodreads.

  • In your manifest set com.pohart.goodreads.Authenticate to handle a URI:

        android:name="com.pohart.goodreads.Authenticate" android:enabled="true" >
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="yourschema" android:host="goodreads-authenticate"/>
  • In your manifest set the activity that launches after authentication to handle a URI:

            <action android:name="android.intent.action.VIEW"/> 
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="yourschema" android:host="goodreads"/>
  • Launch the authentication activity:

    ResponseParser parser = new ResponseParser(this)
    if( ! parser.isAuthenticated()) {
        Intent goodReadsIntent = new Intent(Intent.ACTION_VIEW,Uri.parse("yourschema://goodreads-authenticate"));
        goodReadsIntent.putExtra(Authenticate.CONSUMER_KEY, ACCESS_TOKEN);
        goodReadsIntent.putExtra(Authenticate.CALLBACK_URL, "yourschema://goodreads");
        goodReadsIntent.putExtra(Authenticate.CONSUMER_SECRET, TOKEN_SECRET);
    } else {
        //you are authenticated
        List<Review> books = parser.getBookOnShelf("to-read",1);

Thats It!

After you have authenticated you can access all api functionality through ResponseParser.

Known Issues

  1. When Calling back to the application, Authenticate does not remove it's activities from the stack.
  2. Only getBooksOnShelf finds the user based on the currently logged in user, all other user based calls require the useid. The information is trivially there for all of them.
  3. Inconsistant naming: Almost all methods in ResponseParser are named using an uppercase first character.