A Ruby wrapper for the Pinboard API.
gem install pinboard
I'm currently exploring two API interfaces:
pinboard = Pinboard::Client.new(:token => 'your_api_token')
posts = pinboard.posts
Your API token can be found on your settings/password page.
or:
posts = Pinboard::Post.all(:username => 'foo', :password => 'bar')
Both examples work.
Passing arguments: (works only for the Client API Interface)
pinboard.posts(:tag => 'ruby') #all posts tagged 'ruby'
pinboard.posts(:tag => 'ruby,pinboard') #all posts tagged 'ruby' and 'pinboard'
pinboard.posts(:start => 20) #starting on the 20th post
pinboard.posts(:results => 20) #return only first 20 matching posts
pinboard.posts(:fromdt => 4.days.ago) #all posts in past 4 days
pinboard.posts(:todt => 4.days.ago) #all posts up to 4 days ago
Adding new posts:
pinboard.add(:url => "http://example.com/", :description => 'Example post')
pinboard.posts(:meta => true) #include meta data in post models
I am using travis-ci.org for continuous integration and support of the following rubies in rvm:
If you find what looks like a bug:
If you want to contribute an enhancement or a fix:
See MIT-LICENSE for details.
Copyright (c) 2011 Ryan Walker.
Copyright (c) 2013-2016 Jan-Erik Rediger.