1.0.4 • Published 3 years ago

bluesg-api v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years 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

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago