hatena-bookmark-api

v3.0.2
Hatena::Bookmark API wrapper for Node.js (unofficial)
api bookmark hatena

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:
...

Badges

npm version Travis CI

License

MIT

Author

bouzuya <[email protected]> (http://bouzuya.net)

npm i hatena-bookmark-api

Metadata

  • MIT
  • Whatever
  • bouzuya
  • released 5/1/2020

Downloads

Maintainers