chepiao-sdk
v0.1.4
Published
Node.js SDK for chepiao100.com
Downloads
3
Readme
node-chepiao-sdk
Node.js SDK for chepiao100.com.
Install
npm install chepiao-sdk --save
Usage
Register and get your
userid
andseckey
: chepiao100.comInitialize the SDK
var Chepiao = require('chepiao-sdk'); var chepiao = new Chepiao({ userid: 'your userid', seckey: 'your secret key' });
Use the API
chepiao.schedule('g1', function (res) { // do stuff with the response });
API
- Train schedule
chepiao.schedule(number, callback);
- Query train tickets
chepiao.leftTickets(date, startStation, arriveStation, callback);
- Query flight tickets
chepiao.flights(date, depart, arrival, callback);
License
The MIT License