np

node-pinboard

A Node.js wrapper for the Pinboard API.

Showing:

Popularity

Downloads/wk

19

GitHub Stars

92

Maintenance

Last Commit

2yrs ago

Contributors

2

Package

Dependencies

1

Size (min+gzip)

0.8KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

node-pinboard

npm package Build Status

A Node.js wrapper for the Pinboard API.

Installation

npm install node-pinboard

Available functions

node-pinboard follows the Pinboard v1 API with token auth (token can be found on settings/password).

Errors

Under the hood, node-pinboard uses node-fetch, so API call errors will follow that library's patterns.

Tests

npm test

To determine code coverage:

npm run coverage

Examples

const Pinboard = require('node-pinboard').default;
const api_token = 'user:NNNNNN';

const pinboard = new Pinboard(api_token);

const options = {
  url: 'https://github.com/maxmechanic/node-pinboard',
  description: 'node pinboard',
  tags: 'github,node-pinboard,test',
  toread: 'yes'
};

pinboard.add(options, (err, res) => {
  console.log(res);
  //{ result_code: 'done' }
});

pinboard.get({ tag: 'node-pinboard' }, (err, res) => {
  console.log(res);
  //date: date,
  //user: 'user',
  //posts:
  //[ { href: 'https://github.com/maxmechanic/node-pinboard',
  //description: 'node pinboard',
  //extended: '',
  //meta: 'meta',
  //hash: 'hash',
  //time: 'time',
  //shared: 'no',
  //toread: 'yes',
  //tags: 'git node-pinboard test' } ] }
});

// promise version

pinboard.get({ tag: 'node-pinboard' }).then(res => {
  console.log(res);
});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100