# nusbuses

> NUS Buses api for javascript

Latest version **1.0.3** (published 2018-04-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install nusbuses
pnpm add nusbuses
yarn add nusbuses
bun add nusbuses
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-04-10 |
| First published | 2018-04-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Koh Chi Hao |
| Maintainers | kohchihao |
| Keywords | nus, bus, api, nus-bus, route, time, nusbuses |

## Links

- npm: https://www.npmjs.com/package/nusbuses
- Repository: https://github.com/kohchihao/nusbuses-api
- Homepage: https://github.com/kohchihao/nusbuses-api#readme
- Issues: https://github.com/kohchihao/nusbuses-api/issues
- npm.io page: https://npm.io/package/nusbuses

## Dependencies (3)

- [request](https://npm.io/package/request.md) ^2.85.0
- [lodash.partial](https://npm.io/package/lodash.partial.md) ^4.2.1
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.2

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2018-04-10
- 1.0.2 — 2018-04-10
- 1.0.1 — 2018-04-08
- 1.0.0 — 2018-04-08

## README

# nusbuses

# Installation
```bash
$ npm install --save nusbuses
```

## Usage

```javascript
const nusbuses = require('nusbuses');

nusbuses.getAllBuses()
.then(function(data) {
  console.log(data);
}).catch(function(err) {
  console.log(err);
})


//data 
/*{
  "ShuttleServiceResult": {
    "caption": "COM2 (CP13)",
    "name": "COM2",
    "shuttles": [
      {
        "arrivalTime": "32",
        "name": "A1",
        "nextArrivalTime": "62",
        "nextPassengers": "-",
        "passengers": "-"
      },
      {
        "arrivalTime": "16",
        "name": "D1(To BIZ2)",
        "nextArrivalTime": "51",
        "nextPassengers": "-",
        "passengers": "-"
      },
      {
        "arrivalTime": "2",
        "name": "D1(To UTown)",
        "nextArrivalTime": "32",
        "nextPassengers": "-",
        "passengers": "-"
      },
      {
        "arrivalTime": "4",
        "name": "A2",
        "nextArrivalTime": "24",
        "nextPassengers": "-",
        "passengers": "-"
      }
    ]
  }
}*/
```

# Available Methods 
All public method returns [Bluebird Promise](https://github.com/petkaantonov/bluebird/)

- `getBus(busId)` : busId is the id for the Bus. Eg : `AS7`
- `getAllBuses` : To get all the buses in NUS
- `getAS7` 
- `getBIZ2`
- `getBotanicGardenMRT`
- `getOeiTiongHamBuilding`
- `getCentralLibary`
- `getCollegeGreenHostel`
- `getCOM2`
- `getComputerCentre`
- `getEA`
- `getKentRidgeBusTerminal`
- `getKentRidgeMRT`
- `getKentVale`
- `getLT13`
- `getLT29`
- `getMuseum`
- `getOppHSSML`
- `getOppKentRidgeMRT`
- `getOppNUSS`
- `getOppPGP12`
- `getOppUHall`
- `getOppStaffClub`
- `getPGP12`
- `getPGP1415`
- `getPGP7`
- `getPGPR`
- `getPrinceGeorgesPark`
- `getRafflesHall`
- `getS17`
- `getUHall`
- `getStaffClub`
- `getUTown`
- `getOppLT13`
- `getYIH`

All requests are made by [request-promise](https://github.com/request/request-promise).

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