Goodreads API wrapper for NodeJS
This is a dead simple wrapper for the Goodreads API when using NodeJS. I've only exposed a few GR API functions so far but would be happy to entertain adding more if there's demand.
curl http://npmjs.org/install.sh | shnpm install goodreadsgoodreads = require 'goodreads'goodreads = require('goodreads');gr = new goodreads.client { 'key': key, 'secret': secret }gr = new goodreads.client({ 'key': key, 'secret': secret });export GOODREADS_KEY=yourkeyexport GOODREADS_SECRET=yoursecretnode examples/booklist.js to get an idea how things workshowUser - get user info with userName
getShelves 'your_username', (json) ->getShelves - Get all shelves for a given user
getShelves '4085451', (json) ->getSingleShelf - Get a specific list by ID
getSingleShelf {'userID': '4085451', 'shelf': 'web', 'page': 1, 'per_page': 200}, (json) ->requestToken - OAUTH: calls back an object with oauthToken, oauthTokenSecret, and the URL!
{ oauthToken: 'iu1iojij14141411414', oauthTokenSecret: 'j1kljklsajdklf132141', url: 'http://goodreads.com/blah'}requestToken (callback) ->processCallback - expects: oauthToken, oauthTokenSecret, authorize (from the query string) Note: call this after requestToken!
{ 'username': 'Brad Dickason', 'userid': '404168', 'success': 1, 'accessToken': '04ajdfkja', 'accessTokenSecret': 'i14k31j41jkm' }processCallback oauthToken, oauthTokenSecret, params.query.authorize, (callback) ->getAuthor - Get paginated list of books for a given author
Example: getAuthor '18541', 2, (json) ->getSeries - Get all books in a given series
getSeries '40650', (json) ->More to come!
First step: Check out the /examples folder. It's decently documented.
If you're still having issues, you can submit them here: https://github.com/bdickason/node-goodreads/issues
v0.0.5 - Removed OAuth workarounds
showUser} method added - can get user information given their username.v0.0.2 - Removed OAuth workarounds
processCallback) now properly returns an Access Token (accessToken) and Access Token Secret (accessTokenSecret)v0.0.1 - First release! Woohoo!!
getShelves)getSingleShelf)requestToken and processCallbackNo open issues yet, or sync has not completed.