0.1.2 • Published 3 years ago

hk-nexttrain v0.1.2

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

Next Train (Hong Kong)

Non-official Node.JS wrapper for Next Train

Resources

Getting Started

Install

npm install hk-nexttrain

Usage

import { NextTrain } from 'hk-nexttrain';
// or
const { NextTrain } = require('hk-nexttrain');

const line = 'TCL';
const sta = 'TSY';
const lang = 'EN';

const results = await NextTrain.getETA({
  line,
  sta,
});

const Tline = NextTrain.translate({
  str: line,
  lang,
});
const Tsta = NextTrain.translate({
  str: sta,
  lang,
});