14 November 2009
Filed under Blog

A new Ruby gem for the Readernaut API

I was so happy to discover Readernaut this weekend. It's got a lot of features and the interface seems much more intuitive than Shelfari or Good Reads. Since John Nunemaker's HTTParty makes writing API wrappers in Ruby so much fun, I knocked out readernaut.

Installation

sudo gem install gemcutter
gem tumble
sudo gem install readernaut

Usage

# get a list of books for a user
books = Readernaut.books("pengwynn")
books.reader_books.first.book_edition.title
=> "Crush It!"

# get a list of notes for a user
notes = Readernaut.notes("pengwynn")

# get a list of contacts for a user 
contacts = Readernaut.contacts("pengwynn").contacts
contacts.last.user.username
=> "blankenship"

# paginate, ordering
books = Readernaut.books("pengwynn", :page => 3, :order_by => "modified")
# descending
books = Readernaut.books("pengwynn", :page => 3, :order_by => "-modified")

So, what are you reading? Why not friend me and recommend something.

Like this? Why not grab the feed?