npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wdouban

v1.0.2

Published

DouBan SDK for node.js

Downloads

4

Readme

wdouban

DouBan SDK for node.js

npm npm npm

Table of Contents generated with DocToc

安装

npm i --save wdouban
# or
yarn add wdouban

使用说明

参数

username

用户名,必须

type

类型,默认值 book ,可选:

  • book 图书
  • movie 电影
  • music 音乐

status

状态,默认值 mark,可选:

  • mark 想看
  • doing 在看
  • done 看过
  • attend 参与

page

页码,默认值 1

size

每页条数,默认值 50

示例:

const wdouban = require('wdouban');

wdouban({
  username: 'willinwang',
  type: 'book',
  status: 'mark',
  page: 1,
  size: 50
}).then((data) => {
  console.log(data);
});

响应

正确响应

示例:

{
  "status": 1,
  "total": 2,
  "page": 1,
  "pages": 1,
  "size": 50,
  "data": [
    {
      "comment": "",
      "rating": null,
      "sharing_text": "https://www.douban.com/doubanapp/dispatch?uri=/book/27153485/ 来自@豆瓣App",
      "tags": [
        "生活",
        "文学"
      ],
      "platforms": [],
      "create_time": "2018-02-28 16:52:21",
      "status": "mark",
      "id": 1333178450,
      "subject": {
        "rating": {
          "count": 221,
          "max": 10,
          "star_count": 4.5,
          "value": 9.1
        },
        "sharing_url": "https://www.douban.com/doubanapp/dispatch?uri=/book/27153485/",
        "pubdate": [
          "2017-10"
        ],
        "author": [
          "李青菜"
        ],
        "url": "https://book.douban.com/subject/27153485/",
        "pic": {
          "large": "https://qnmob3.doubanio.com/lpic/s29558324.jpg?imageView2/2/q/80/w/600/h/3000/format/webp",
          "normal": "https://qnmob3.doubanio.com/lpic/s29558324.jpg?imageView2/2/q/80/w/200/h/300/format/webp/sharpen/1"
        },
        "uri": "douban://douban.com/book/27153485",
        "is_released": true,
        "card_subtitle": "李青菜 / 2017 / 中信出版社",
        "has_ebook": false,
        "subtype": "book",
        "press": [
          "中信出版社"
        ],
        "title": "当喵星人有了门牌号",
        "type": "book",
        "id": "27153485",
        "null_rating_reason": ""
      }
    },
    {
      "comment": "",
      "rating": null,
      "sharing_text": "https://www.douban.com/doubanapp/dispatch?uri=/book/27073501/ 来自@豆瓣App",
      "tags": [
        "文学"
      ],
      "platforms": [],
      "create_time": "2018-02-28 16:51:17",
      "status": "mark",
      "id": 1333177806,
      "subject": {
        "rating": {
          "count": 316,
          "max": 10,
          "star_count": 4.5,
          "value": 9
        },
        "sharing_url": "https://www.douban.com/doubanapp/dispatch?uri=/book/27073501/",
        "pubdate": [
          "2017-8-1"
        ],
        "author": [
          "[英] 詹姆斯·伍德"
        ],
        "url": "https://book.douban.com/subject/27073501/",
        "pic": {
          "large": "https://qnmob3.doubanio.com/lpic/s29479379.jpg?imageView2/2/q/80/w/600/h/3000/format/webp",
          "normal": "https://qnmob3.doubanio.com/lpic/s29479379.jpg?imageView2/2/q/80/w/200/h/300/format/webp/sharpen/1"
        },
        "uri": "douban://douban.com/book/27073501",
        "is_released": true,
        "card_subtitle": "[英] 詹姆斯·伍德 / 2017 / 河南大学出版社",
        "has_ebook": false,
        "subtype": "book",
        "press": [
          "河南大学出版社"
        ],
        "title": "最接近生活的事物",
        "type": "book",
        "id": "27073501",
        "null_rating_reason": ""
      }
    }
  ]
}

报错响应

示例:

{
  "status": 0,
  "error": "Error Message"
}

License

Apache 2.0

通过支付宝捐赠:

qr