A Node JS wrapper for the Transport for London Unified API and TrackerNet
  • TypeScript 99.7%
  • JavaScript 0.3%
Find a file
github-actions[bot] 8552d1dc61 Updated Documentation
2022-01-30 14:09:05 +00:00
.github Update main.yml 2022-01-30 14:08:37 +00:00
docs Updated Documentation 2022-01-30 14:09:05 +00:00
lib fix stopPoint.getInRadius 2022-01-30 06:10:51 +00:00
static Prettier Formatting 2021-05-13 08:50:59 +00:00
tests Clear file 2021-01-18 14:29:08 +00:00
typedoc Remove log 2022-01-20 02:08:22 +00:00
.gitignore Add .vscode 2021-01-18 14:25:55 +00:00
.gitpod.yml Fully automate dev setup with Gitpod 2021-03-18 09:32:13 +00:00
.prettierignore Add .prettierignore 2021-01-11 16:55:18 +00:00
.prettierrc Change trailingComma from ES5 to none 2021-05-13 08:51:29 +00:00
CHANGELOG.md Update CHANGELOG.md 2021-12-30 00:44:21 +00:00
index.ts Merge branch 'master' into development 2021-12-29 04:12:22 +00:00
LICENSE Create LICENSE 2021-01-22 15:27:40 +00:00
package.json Merge Development -> Master 2022-01-30 13:49:16 +00:00
README.md Update README.md 2022-01-02 15:45:05 +00:00
tsconfig.json Fix formatting 2021-12-29 04:14:56 +00:00
typedoc.json Remove typedoc-theme-dark 2022-01-20 02:13:21 +00:00
yarn.lock Updated Documentation 2022-01-20 02:14:28 +00:00

TfL Logo

TfL API Wrapper

A NodeJS wrapper for the TfL Unified API, made with TypeScript.

Read the Documentation

Language grade: JavaScript CI NPM Version Issues Gitpod ready-to-code

Installation

npm install tfl-api-wrapper
yarn add tfl-api-wrapper

Contribute

There are many ways to contribute to this repo.

Example Usage

Async... await

import { StopPoint } from 'tfl-api-wrapper';

const app_key = 'API KEY HERE'; // Use an environment file
const stopPoint = new StopPoint(app_key)

const arrivals = await stopPoint.getStationArrivals('940GZZLUKSX');
console.log(arrivals);

Callback

import { StopPoint } from 'tfl-api-wrapper';

const app_key = 'API KEY HERE'; // Use an environment file
const stopPoint = new StopPoint(app_key)

stopPoint.getStationArrivals('940GZZLUKSX').then((arrivals) => {
    console.log(arrivals)
});

Disclaimer

This repository is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Transport for London (TfL) or it's parent organisation Greater London Authority (GLA)