Socket
Book a DemoInstallSign in
Socket

node-pinboard

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pinboard

A Node.js wrapper for the Pinboard API.

2.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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);
});

Keywords

pinboard

FAQs

Package last updated on 02 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.