4.1.1 • Published 3 years ago

dsbapi v4.1.1

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
3 years ago

Test Status Greenkeeper badge

Installation

Use your favorite package manager for javascript

yarn add dsbapi
# Or
npm install dsbapi --save

Note: Requires node >= 8

How to use:

Read the Documentation

https://noim.me/DSBAPI/

In NodeJS

const DSB = require('dsbapi');

const dsb = new DSB('USERNAME', 'PASSWORD');

dsb.fetch()
	.then(data => {
		const timetables = DSB.findMethodInData('timetable', data);
		const tiles = DSB.findMethodInData('tiles', data);

		// Work with it
	})
	.catch(e => {
		// An error occurred :(
		console.log(e);
	});

Or with modern javascript

import DSB from 'dsbapi';

const dsb = new DSB('USERNAME', 'PASSWORD');

async function getMyShit() {
	const data = await dsb.fetch();
	const timetables = DSB.findMethodInData('timetable', data);
	const tiles = DSB.findMethodInData('tiles', data);

	// YEAH
}

getMyShit();

Fetch V1

The old iPhone API is not active anymore. You need to use the new fetch() method. After you got the data with the fetch() method you can find the timetables with the findMethodInData method. Look at the example above.

Browser

It will probably not work in the browser. The dsb does not set cors, so you are not able to use this module on the client side of your website. You can only use it on the backend.

4.1.1

3 years ago

4.1.0

3 years ago

4.0.4

4 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.2.8

5 years ago

3.2.7

5 years ago

3.2.6

5 years ago

3.2.5

5 years ago

3.2.4

5 years ago

3.2.3

5 years ago

3.2.2

5 years ago

3.1.3

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

7 years ago

3.0.1

7 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago