Instapaper is a ruby wrapper for interacting with Instapaper's Full API. Note that access to the Full API is restricted to Instapaper subscribers only.
gem install instapaper
This library offers full support for all methods exposed through Instapaper's Full API. Note that Instapaper's API does not support the request-token/authorize workflow. To obtain an access token, use the
Changes in 1.0.0
If you've used earlier versions of this library, a lot has changed in version
1.x. While not a total rewrite, I've changed a number of things based on my experience writing API libraries:
- swapped out Faraday for http.rb
- responses now return custom classes instead of Hashie::Rash objects
- most API methods are more clear as to their behavior (i.e.,
#star_bookmarkinstead of just
- module-based configuration and invocation has been removed, you'll now need to instantiate an
Instapaper::Clientinstead (see usage below)
- Improved error handling
- Updates for version 1.1 of Instapaper's API
- Support for Highlights API
client = Instapaper::Client.new do |client| client.consumer_key = YOUR_CONSUMER_KEY client.consumer_secret = YOUR_CONSUMER_SECRET client.oauth_token = YOUR_OAUTH_TOKEN client.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET end
To obtain an access token via xAuth:
You can also verify credentials once you have received tokens:
Retrieve a list of bookmarks:
Add a new bookmark:
client.add_bookmark('http://someurl.com', :title => 'This is the title', :description => 'This is the description')
Remove a bookmark:
Update read progress:
Star/Un-star a bookmark:
Archive/Un-archive a bookmark:
Move a bookmark to a folder:
Obtain the text of a bookmark:
To obtain the list of folders:
You can add by passing a name:
And remove folders by referencing a folder by it's id.
Lastly, the folders can be reordered:
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with Rakefile, gem version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.
Copyright (c) 2015 Steve Agalloco. See LICENSE for details.