bluesg-api
v1.0.4
Published
``` npm i bluesg-api ```
Downloads
8
Readme
BlueSG API Helper
Instructions
Install BlueSG API Library
npm i bluesg-api
Import BlueSG API to your code
import * as BlueSGApi from "bluesg-api";
Explore Stations and Availabilities
(async() => {
const token = await BlueSGApi.getToken();
if (!token) {
throw new Error('unable to get token');
}
const stations = await BlueSGApi.getStations(token);
if (!stations) {
throw new Error('unable to get station');
}
const availabilities = await BlueSGApi.getAvailabilities(token, ['queenstown-scienceparkdr-dnvgl-lobby']);
console.log(availabilities);
})();
Viola!