# tfl-bus-api

> Grab bus info

Latest version **0.0.2** (published 2014-03-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install tfl-bus-api
pnpm add tfl-bus-api
yarn add tfl-bus-api
bun add tfl-bus-api
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-03-10 |
| First published | 2014-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | charliedowler |
| Maintainers | charliedowler |
| Keywords | bus, tfl |

## Links

- npm: https://www.npmjs.com/package/tfl-bus-api
- Repository: https://github.com/charliedowler/tfl-bus-api
- Issues: https://github.com/charliedowler/tfl-bus-api/issues
- npm.io page: https://npm.io/package/tfl-bus-api

## Dependencies (3)

- [q](https://npm.io/package/q.md) ~1.0.0
- [request](https://npm.io/package/request.md) ~2.34.0
- [underscore](https://npm.io/package/underscore.md) ~1.6.0

## Recent versions

- 0.0.2 (latest) — 2014-03-10
- 0.0.1 — 2014-03-08

## README

#tfl-bus-api (WIP) [![Build Status](https://travis-ci.org/charliedowler/tfl-bus-api.png?branch=master)](https://travis-ci.org/charliedowler/tfl-bus-api)
Simple node service for grabbing bus route information.

##Usage:
```javascript
//Using a promise
var myBus = new Bus(11).then(function(bus) {
    //access to methods on bus
});

//Using a callback
var myBus = new Bus(11, function(bus) {
    //access to methods on bus
});
```

###Methods:
```javascript
bus.first() //Return lat & lng for first bus stop

bus.last() //Return lat & lng for last bus stop

/**
 * Search list of stops by smsCode/name displayed on stop sign
 * @param smsCode {Number}
 * @returns {id, smsCode, name, stopIndicator, towards, direction, lat, lng, routes}
 */
bus.findStopBySmsCode(int)
bus.findStopByName(String)

bus.geometry() // Returns array of lat & lng, start to end
```

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