0.0.13 • Published 7 years ago

tfl-api-client v0.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Tfl-API-Client

A socket.io wrapper for the https://api.tfl.lu streaming API This packages uses UMD, so it can be used as commonjs, amd package and can be loaded via script tag

Install with npm

npm install tfl-api-client

Build Setup

# install dependencies
npm install

# Run demo at localhost:8080
npm install
npm run start

How to use client using script tag

<script src="path/to/node_modules/tfl-api-client/dist/bundle.js"></script>
<script>
    var api = new TfLAPIClient('https://api.tfl.lu/v1');
    api.subscribe('/BikePoint', function(data) {
        console.log(data)
    });
</script>

How to use client using commonjs

const TfLAPIClient = require('tfl-api-client');

var api = new TfLAPIClient('https://api.tfl.lu/v1');
api.subscribe('/BikePoint', function(data) {
    console.log(data)
});
0.0.13

7 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago