ebike-connect-js
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

ebike-connect-js

An unofficial API for the Bosch eBike Connect web service, written for Node.js. 🚲

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:

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 by running node -r dotenv/config myfile.js.

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.

Readme

Keywords

none

Package Sidebar

Install

npm i ebike-connect-js

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

24.6 kB

Total Files

15

Last publish

Collaborators

  • floriancassayre