api-tan-wrapper
Little node wrapper for Tan API.
This little wrapper allow you to get all stations, can deliver similar stations name and time left for a station.
Installation
yarn add api-tan-wrapper
Usage
const TanWrapper = ;const tan = production: true // default: false // You can use NODE_ENV = production too locale: 'fr_FR' // default: 'fr_FR'; // Get all stationsawait tan; // Get stations in a 500m range of the locationawait tan // Get all tram stationsawait tan; // Get all bus stationsawait tan; // Get waiting time at stationawait tan; // or tan.getWaitingTimeFromStation('bjoi'); // Get times from stationawait tan; // or tan.getTimesFromStation('bjoi', 1, 2); // Get array of stations nametan; // stations here is the result of tan.getAllStations(); // Get station from station nameawait tan; // Get station from codeawait tan; // Get similar stations nametan; // 2 is the number of similar stations you want to get in return
Licence
MIT @Toinane