1.1.1 • Published 6 years ago

geektime v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

geektime

API client for time.geekbang.org (极客时间)

INSTALL

npm install geektime
# or
yarn add geektime

EXAMPLE

const Geektime = require('geektime');
const client = new Geektime('phone', 'pass');

(async () => {

  try {
    const products = await client.products();
    console.log(products);
  } catch (error) {
    console.error(error);
  }

})();

API

init

new Geektime([country], phone, password)

country 为可选,如果不传,当 86 处理

products()

返回产品列表 (专栏/视频课/微课/其他)

intro(cid)

返回专栏信息

articles(cid, size = 1000)

返回专栏文章列表

article(id)

返回单篇文章详情

comments(aid, size = 200, prev = 0)

返回专栏文章评论

audios(cid, size = 1000)

返回音频列表

NOTE

paramnote
cid专栏 id
id文章 id

License

MIT

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago