node package manager

node-pinboard

A Node.js wrapper for the Pinboard API.

node-pinboard

A Node.js wrapper for the Pinboard API.

npm install node-pinboard

node-pinboard follows the Pinboard v1 API with token auth (token can be found on settings/password) and can either return the server response as the result of a function or the response can be handled via callback.

Most options follow those solicited by the API, with the exception of the pluralization of 'tags' in the node-pinboard object where appropriate.

var Pinboard = require('node-pinboard');
var api_token = 'user:NNNNNN';
 
var pinboard = new Pinboard(api_token);
 
var options = {
url: 'https://github.com/mikeal/request',
description: ' mikeal / request',
tags: 'git,node-pinboard,test',
toread: 'yes'
   };
 
pinboard.add(options, function(errres) {
     console.log(res);
     //{ result_code: 'done' } 
});
 
pinboard.get({tag: 'node-pinboard'}, function(errres) {
console.log(res);
//date: date, 
   //user: 'user', 
   //posts: 
    //[ { href: 'https://github.com/mikeal/request', 
       //description: 'mikeal / request', 
       //extended: '', 
       //meta: 'meta', 
       //hash: 'hash', 
       //time: 'time', 
       //shared: 'no', 
       //toread: 'yes', 
       //tags: 'git node-pinboard test' } ] } 
});

API docs: "Returns a list of the user's most recent posts, filtered by tag."

options: url (req), description (title)(req), extended, tags, dt (datetime), replace (yes/no), shared (yes/no), toread (yes/no)

API docs: "Add a bookmark."

API docs: "Delete a bookmark."

options: url (req), description (title)(req), extended, tags, dt (datetime), replace (yes/no), shared (yes/no), toread (yes/no)

API docs: "Returns one or more posts on a single day matching the arguments. If no date or url is given, date of most recent bookmark will be used."

options: tags

API docs: "Returns a list of dates with the number of posts at each date."

options: tags

API docs: "Returns a list of the user's most recent posts, filtered by tag."

options: tag, start, results, fromdt, todt, meta

API docs: "Returns all bookmarks in the user's account."

API docs: "Returns a list of popular tags and recommended tags for a given URL. Popular tags are tags used site-wide for the url; recommended tags are drawn from the user's own tags."

API docs: "Returns a full list of the user's tags along with the number of times they were used."

API docs: "Delete an existing tag."

options: old (req), new (req)

API docs: "Rename an tag, or fold it in to an existing tag"

API docs: "Returns the user's secret RSS key (for viewing private feeds)"

API docs: "Returns the user's API token (for making API calls without a password)"

API docs: "Returns a list of the user's notes"

API docs: "Returns an individual user note. The hash property is a 20 character long sha1 hash of the note text."