node-12306

0.0.1 • Public • Published

12306 t12306

12306 javascript client

Installation

$ npm install t12306

Example

const T12306 = require('t12306');

const train = T12306();

(async () => {
  
  const list = await train.query('BJP', 'SHH', '2019-12-28');
  const img = await train.captcha_image();
  const pos = await train.captcha_recognize(img);
  const res = await train.captcha_check(pos);
  const uamtk = await train.login('admin', 'admin', pos);
  const newapptk = await train.auth_uamtk(uamtk);
  const { username, apptk } = await train.uamauthclient(newapptk);
  const passengers = await train.getPassengerDTOs();

})();

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3

MIT

This work is licensed under the MIT license.


Dependents (0)

Package Sidebar

Install

npm i node-12306

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

111 kB

Total Files

10

Last publish

Collaborators

  • song940