Skip to content

panda-network/pocket-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node for Pocket

Node npm for the Pocket API

Install

First, install the pocket api with npm.

npm install pocket-api

How to use

Please review the pocket API for expected inputs and outputs and authentication flow. Specifically Step 3, where you need to redirect the user to Pocket for authorization, which is not covered in this npm.

var pocket = require('pocket-api')

var consumer_key = 'your consumer_key';

pocket.getRequestToken( consumer_key , function( data ) {
	console.log( data );
	//returns request_token
});

pocket.getAccessToken( consumer_key , request_token, function( data ) {
	console.log( data );
	//returns username and access_token
});

pocket.getArticles( consumer_key , access_token, function( error, data ) {
	console.log( error, data );
	//returns articles
});

pocket.addArticles( url-to-add, consumer_key , access_token, function( error, data ) {
	console.log( error, data );
});

pocket.modifyArticles( actions, consumer_key , access_token, function( error, data ) {
	console.log( error, data )
});

About

Node npm for the Pocket API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%