Skip to content

IndexXuan/v2ex-api-bridge

Repository files navigation

V2EX

v2ex-api-bridge

Build Status Code Coverage Vim Best Editor

js-standard-style

Intro

V2EX API Bridge: 提供论坛公开API的封装和私有API的挖掘实现,目前已支持 登录,签到,发帖,回帖,账户,消息 等非官方API功能.  

  • see app/router.js to find full router config & demo api links

Development

  • require Node.js 7.6.0+ (async & await)
  • recommend yarn install
  • recommend nvm - the Node.js Version Manager
$ npm install
$ npm run dev

Features

  • ✔︎ Full RESTful Style APIs Wrapped
  • ✔︎ 40+ Case, 95%+ Unit Test(BDD) with Docs
  • ✔︎ Server Hot Reload in Dev
  • ✔︎ pre-commit hook to run codecov & build jsdoc, host in Github Pages @see package.json#pre-commit
  • ✔︎ CI Support

Docs

Unit Test

  • mocha, thunk-mocha, power-assert, istanbul is build-in to egg-bin, so you can just use it.
  • power-assert is very powerful, No API is the best API.
  • see egg unit test docs for more detail.

npm scripts

  • Use npm start to run server in prod mode
  • Use npm run dev to dev
  • Use npm run lint to run eslint(eslint not native support es@next now, so...)
  • Use npm test to run unit test
  • Use npm run cov to run code coverage

Todo

  • parse the response html to get more private APIs
  • improve docs and 'codecov'
  • make pwa using the APIs
  • make it more egg best practice

Links