hatena-bookmark-api
v3.0.2
Published
Hatena::Bookmark API wrapper for Node.js (unofficial)
Downloads
10
Readme
hatena-bookmark-api
Hatena Bookmark REST API wrapper for Node.js (unofficial)
Installation
npm install hatena-bookmark-api
Usage
import { Client } from 'hatena-bookmark-api';
const client = new Client({
consumerKey: 'consumerKey',
consumerSecret: 'consumerSecret',
accessToken: 'accessToken',
accessTokenSecret: 'accessTokenSecret'
});
// GET /rest/1/my/bookmark
client.getBookmark({ url })
.then((bookmark) => {
console.log(bookmark);
})
See: examples/
.
Get Access Token & Secret
$ # get consumer_key & secret from http://www.hatena.ne.jp/oauth/develop
$ export CONSUMER_KEY=...
$ export CONSUMER_SECRET=...
$ node scripts/get-access-token.js
https://www.hatena.ne.jp/oauth/authorize?oauth_token=...
listening for callback: localhost:4567
access_token:
...
access_token_secret:
...