hatena-bookmark-api
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

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 <m@bouzuya.net> (http://bouzuya.net)

/hatena-bookmark-api/

    Package Sidebar

    Install

    npm i hatena-bookmark-api

    Weekly Downloads

    2

    Version

    3.0.2

    License

    MIT

    Unpacked Size

    19.3 kB

    Total Files

    16

    Last publish

    Collaborators

    • bouzuya