chepiao-sdk

0.1.4 • Public • Published

node-chepiao-sdk

NPM version David deps

NPM

Node.js SDK for chepiao100.com.

Install

npm install chepiao-sdk --save

Usage

  1. Register and get your userid and seckey: chepiao100.com

  2. Initialize the SDK

    var Chepiao = require('chepiao-sdk');
    var chepiao = new Chepiao({
        userid: 'your userid',
        seckey: 'your secret key'
    });
  3. 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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.4
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.4
    3
  • 0.1.2
    2
  • 0.1.1
    2
  • 0.1.0
    1

Package Sidebar

Install

npm i chepiao-sdk

Weekly Downloads

8

Version

0.1.4

License

none

Last publish

Collaborators

  • fantasyshao