tobiaswright / pocket-api Goto Github PK
View Code? Open in Web Editor NEWNode npm for the Pocket API
Node npm for the Pocket API
Use native fetch instead to drop the dependency.
Will be removing call completely. 0.4.2 will be last version with callbacks.
When we switch to promises, it will be a breaking change. The Readme will need to be updated for promises and clarity
There have been many improvements to this library since the last publish on NPM (v1.0.1 was published over two years ago at 2020-08-03T18:49:10.607Z).
Are you willing to publish a new version v1.1.0
?
Would want to catch errors before submitting the API
Hi Tobias,
Hope you could help me to use your getpocket api
My code is the following
var pocket = require('pocket-api');
var consumer_key = '33575-07308cea474550725539d2c1';
var request_token = '';
var access_token = '';
pocket.getRequestToken( consumer_key , function( data ) {
console.log('request token:');
console.log( data );
request_token = data;
});
pocket.getAccessToken( consumer_key , request_token, function( data ) {
console.log('access token:');
console.log( data );
access_token = data;
});
pocket.getArticles( consumer_key , access_token, function( error, data ) {
console.log('get:');
console.log( error, data );
});
after executing with
node code.js
i got this error
get:
A valid access token is required to access the requested API endpoint. null request token:
{ code: '08561cc2-3a20-e1f2-c912-fedaa8', state: null }
SyntaxError: Unexpected token B
at Object.parse (native)
at Request._callback (/Users/francocedillo/files/projects/node/nPocket/node_modules/pocket-api/index.js:39:17)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.