1.0.4 • Published 1 year ago

bluesg-api v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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!

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago