# dsbmobile

> A Javascript wrapper for the dsbmobile api

Latest version **1.2.0** (published 2023-01-15) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-01-15 |
| First published | 2021-10-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 72.4 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | tch1b0 |
| Maintainers | tch1b0 |
| Keywords | wrapper, typescript |

## Links

- npm: https://www.npmjs.com/package/dsbmobile
- Repository: https://github.com/Tch1b0/dsbmobile.js
- Homepage: https://github.com/Tch1b0/dsbmobile.js#readme
- Issues: https://github.com/Tch1b0/dsbmobile.js/issues
- npm.io page: https://npm.io/package/dsbmobile

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.21.4
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.10

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2023-01-15
- 1.1.9 — 2022-10-20
- 1.1.8 — 2022-10-20
- 1.1.7 — 2022-09-05
- 1.1.6 — 2022-07-13
- 1.1.5 — 2022-05-01
- 1.1.4 — 2022-03-08
- 1.1.3 — 2022-03-05
- 1.1.2 — 2022-02-26
- 1.1.1 — 2022-02-18
- 1.1.0 — 2022-01-14
- 1.0.9 — 2021-12-08
- 1.0.8 — 2021-10-10
- 1.0.7 — 2021-10-10
- 1.0.6 — 2021-10-10
- … 1 more at https://npm.io/package/dsbmobile/versions

## README

# dsbmobile.js

![badge](https://img.shields.io/github/license/Tch1b0/dsbmobile.js)
[![badge](https://img.shields.io/npm/v/dsbmobile)](https://www.npmjs.com/package/dsbmobile)
[![badge](https://img.shields.io/badge/docs-%F0%9F%93%96-blue)](https://tch1b0.github.io/dsbmobile.js/)
![badge](https://img.shields.io/github/actions/workflow/status/Tch1b0/dsbmobile.js/ci.yml?branch=master&label=ci)
![badge](https://img.shields.io/github/issues/Tch1b0/dsbmobile.js)

A Javascript package for the [dsbmobile](https://dsbmobile.de) API

## Installation

```bash
$ npm install dsbmobile
```

## Example

```js
import Dsbmobile from "dsbmobile";

const dsb = new Dsbmobile("<id>", "<password>");

dsb.getTimetable().then((timetable) => {
    console.log(timetable.entries[0].newSubject);
});
```

```
English
```

## Documentation

You can read the docs [right here](https://tch1b0.github.io/dsbmobile.js/).

## Contribute

Feel free to contribute [on the Github repository](https://github.com/Tch1b0/dsbmobile.js).

## Browser issues

The official dsbmobile API doesn't send a [CORS header](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), which is required for Browser requests, due to security reasons.

However, there is a way to bypass it that is **not** a security tradeoff.

Use https://mydsb.johannespour.de ([also on Github](https://github.com/Tch1b0/dsb-middleware)) instead.

You can use it like this like this:

```js
new Dsbmobile({
    id: "<id>",
    password: "<password>",
    baseURL: "https://mydsb.johannespour.de",
    resourceBaseURL: "https://mydsb.johannespour.de/light",
});
```

After that, all requests will not be sent to the official Server, but to the mydsb.johannespour.de one, which will make a request for you to the resource and add a CORS header.

If you are concerned about privacy and other things, you can [check out the code](https://github.com/Tch1b0/dsb-middleware), because it's open source.

## Incompatible plan

As I only know the layout of my local DSBmobile substitution plan, it is possible that your DSBmobile substitution plan may be incompatible with this package.

If this is the case, please leave a comment below [issue #43](https://github.com/Tch1b0/dsbmobile.js/issues/43), in which you describe the layout of your plan, so a solution can be worked out.

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