# simplygo-node

> SimplyGo API Wrapper for Node.js

Latest version **1.0.2** (published 2022-06-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install simplygo-node
pnpm add simplygo-node
yarn add simplygo-node
bun add simplygo-node
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-06-13 |
| First published | 2022-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 33.8 KB |
| Known vulnerabilities | 0 (+25 in 2 direct dependencies) |
| Install scripts | no |
| Author | Aniruddha Adhikary |
| Maintainers | tuxboy |

## Links

- npm: https://www.npmjs.com/package/simplygo-node
- npm.io page: https://npm.io/package/simplygo-node

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [axios](https://npm.io/package/axios.md) ^0.27.2

## Recent versions

- 1.0.2 (latest) — 2022-06-13
- 1.0.1 — 2022-06-13
- 1.0.0 — 2022-06-13

## README

# simplygo-node

API wrapper to access TransitLink SimplyGo Transactions of the
Singapore Public Transit System.

### Installation

```shell
npm install simplygo-node
```

### Usage

```typescript
import {SimplyGoApi} from "simplygo-node";

const simplyGo = new SimplyGoApi();

await simplyGo.login({
    user_email: "aniruddha@foobar.net",
    user_password: "foobar"
});

const cards = await simplyGo.getCards();

const transactions = await simplyGo.getTransactions({
    card_id: cards.data[0].UniqueCode, start_date: "13-06-2022", end_date: "13-06-2022"
});

console.table(
    transactions.data.Histories.map(history => ({
        fare: history.Fare,
        pickup: history.EntryLocationName,
        dropOff: history.ExitLocationName
    }))
);

await simplyGo.logout();
```

```text
┌─────────┬─────────┬──────────────────────┬───────────────────────┐
│ (index) │  fare   │        pickup        │        dropOff        │
├─────────┼─────────┼──────────────────────┼───────────────────────┤
│    0    │ '$0.95' │  'Federals Pk Stn'   │    'Catsonn Gdns'     │
│    1    │ '$0.95' │ 'Fukushi Residences' │ 'Opp Federals Pk Stn' │
└─────────┴─────────┴──────────────────────┴───────────────────────┘
```

---
_Source: https://npm.io/package/simplygo-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
