Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/floriancassayre/ebike-connect-js
An unofficial API for the Bosch eBike Connect web service, written for Node.js
https://github.com/floriancassayre/ebike-connect-js
api bosch ebike ebike-connect iot nodejs
Last synced: about 17 hours ago
JSON representation
An unofficial API for the Bosch eBike Connect web service, written for Node.js
- Host: GitHub
- URL: https://github.com/floriancassayre/ebike-connect-js
- Owner: FlorianCassayre
- License: mit
- Created: 2022-09-17T21:22:41.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-09T17:43:02.000Z (29 days ago)
- Last Synced: 2024-10-31T23:03:17.513Z (6 days ago)
- Topics: api, bosch, ebike, ebike-connect, iot, nodejs
- Language: TypeScript
- Homepage:
- Size: 86.9 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ebike-connect-js
![](https://github.com/FlorianCassayre/ebike-connect-js/actions/workflows/ci.yml/badge.svg)
![](https://img.shields.io/npm/v/ebike-connect-js?color=brightgreen)
![](https://img.shields.io/npm/l/ebike-connect-js?color=brightgreen)
An unofficial API for the [Bosch eBike Connect](https://www.ebike-connect.com/) web service, written for Node.js. :bike:
## Installation
```
npm install ebike-connect-js
```## Usage
This library is designed for Node.js only and will not work on browsers.
You will need your username and password for the eBike Connect service.
We recommend storing them in environment variables, e.g. `.env`:
```
EBIKE_CONNECT_USERNAME=xxxxx
EBIKE_CONNECT_PASSWORD=xxxxx
```Then create a file `myfile.js`:
```javascript
import { postAuth, getMyEBikes } from 'ebike-connect-js';const credentials = {
username: process.env.EBIKE_CONNECT_USERNAME,
password: process.env.EBIKE_CONNECT_PASSWORD,
};postAuth(credentials)
.then(auth => getMyEBikes(auth)())
.then(json => console.log(json));
```You may then load these environment variables using e.g. the package [dotenv](https://www.npmjs.com/package/dotenv) by running `node -r dotenv/config myfile.js` (or `ts-node -r dotenv/config myfile.ts`).
## Example project
This library was used to build the following website: **[bike.cassayre.me](https://bike.cassayre.me/)** ([GitHub](https://github.com/FlorianCassayre/ebike-visualization))
## Bug report
The methods and type declarations provided by this library are purely speculative, as the API may change at any time.
Please file a ticket if you encounter problems.
## Related projects
- [eMerzh/ebike-dl](https://github.com/eMerzh/ebike-dl): CLI written in Python to download your data
- [gitlab.com/cycliste-urbain/resources](https://gitlab.com/cycliste-urbain/resources/-/tree/main/eBCDownload): a similar project
- [cgiesche/ebikeconnect-api](https://github.com/cgiesche/ebikeconnect-api): Java client (unmaintained)