mtr-lines-scraper
Retrieve heavy rail and light rail lines and stations from the MTR company easily!
Installation
$ npm install mtr-lines-scraper
Usage
Retrieve railway data from MTR
const getRailwayDetails = ; ;
Using railway data from local cache
Synchronous method
const readFileSync = ;const getRailwayDetailsSync = ; // Assume the cache does exist.const cache = JSON; // Retrieve railway details synchronously.const details = ; // Do whatever you want here.console;console;
Asynchronous method
const readFileSync = ;const getRailwayDetailsSync = ; // Assume the cache does exist.const cache = JSON; // Retrieve railway details asynchronously. ;