Yanoinstapaper_api is a project mainly written in Ruby, based on the View license.
Yet ANOthers Instapaper API - supports full API and read-only mode
ip = YanoInstapaper::API.new
ip.authorize( :username => 'your_username', :password => 's3cr3t!' )
ip = YanoInstapaper::API.new( :consumer_token => '', :consumer_secret => '')
ip.authorize
bookmarks = ip.bookmarks.list # default is to fetch everything
bookmarks = ip.bookmarks.list(:limit => 50)
This code is just a thin wrapper to the API. For the API docs, see http://www.instapaper.com/api/simple or http://www.instapaper.com/api/full
The code simply maps method chains onto API calls:
ip.bookmarks.list
turns into
ip.access('bookmarks/list')
This call either throws an exception (if the API returns a JSON error), JSON-marshalled hashes, or, in the instace of fetching a document, the document in [THIS FORMAT]
This code does no error checking:
ip.foobar.baz
will blindly try to access the Instapaper endpoint 'foobar/baz' and then blow up with a 404. But that at least means that additions to the API shouldn't require modification of this library. Onward to the future!
I originally looked at Matt Biddulph's Instapaper Full (https://github.com/mattb/instapaper_full). I wanted to support both Simple and Full API and do so via an auto-extending interface. But I appreciate his efforts.
Rick Olson's Faraday (https://github.com/technoweenie/faraday) which takes all the pain out of doing this stuff.
And of course, Marco Arment's Instapaper has improved my workflow in many ways. It's a key part of my GTD stack (which includes, since you didn't ask: Instapaper, Evernote, Omnifocus, and the iPhone app, Due).
This software is covered by the GNU Lesser General Public License (see LICENSE.md) and copyright Jason Yanowitz © 2011