Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-kippt

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-kippt

A wrapper for the kippt.com API

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-kippt

A wrapper for the Kippt API.

Installation

You can install using Node Package Manager (npm)

npm install node-kippt

Or define in your package.json dependencies

Usage

Refer to the Kippt developer API page for information about the API response.

Initialize

var Kippt = require('node-kippt');

// Initialize the KipptAPI
// You can easily obtain the API token by running
//   curl --user name:password https://kippt.com/api/account/
var kippt = new Kippt.KipptAPI({
  username: 'YOUR_USERNAME',
  api_token: 'API_TOKEN'
});

Clips API

// Returns the full clips listing
kippt.clips.all(function(error, data) {
  if(!error) console.log(data);
});

// Returns the clip information associated with a clip ID
kippt.clips.getById(CLIP_ID, function(error, data) {
  if(!error) console.log(data);
});

// add to the clips list
kippt.clips.add({
  url: "Clip's url",    // required
  title: "Clip's title",
  list: "resource_uri for clip's list",
  notes: "Notes for the clip",
  is_starred: Boolean,
  is_read_later: Boolean
}, function(error, data) {
  if(!error) console.log(data);
});

// update the clip, refer to above options
kippt.clips.update({
  id: CLIP_ID, // require
  other_options: '' // refer to above options
}, function(error, data) {
  if(!error) console.log(data);
});

// remove the clip
kippt.clips.remove(CLIP_ID, function(error, data) {
  if(!error) console.log('SUCCESS');
});

Lists API

// Returns the full lists object
kippt.lists.all(function(error, data) {
  if(!error) console.log(data);
});

// Returns the list information associated with a list ID
kippt.lists.getById(LIST_ID, function(error, data) {
  if(!error) console.log(data);
});

// add to the list
kippt.lists.add({
  title: "list title", // required
  is_private: Boolean
}, function(error, data) {
  if(!error) console.log(data);
});

// update the list
kippt.lists.update({
  id: LIST_ID, // require
  title: "list title",
  is_private: Boolean
}, function(error, data) {
  if(!error) console.log(data);
});

// remove an item from the list
kippt.clips.remove(LIST_ID, function(error, data) {
  if(!error) console.log('SUCCESS');
});

Keywords

FAQs

Package last updated on 21 Feb 2013

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc