Skip to content
 
 

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages