mirror of
https://github.com/skydiver/ewelink-api.git
synced 2026-01-02 11:07:28 +01:00
27 lines
421 B
Markdown
27 lines
421 B
Markdown
# ewelink-api
|
|
> eWeLink API for Node.js
|
|
|
|
## Installation
|
|
``` sh
|
|
npm install ewelink-api
|
|
```
|
|
|
|
## Usage
|
|
```
|
|
const ewelink = require('ewelink-api');
|
|
|
|
(async () => {
|
|
|
|
const conn = new ewelink({
|
|
email: '<your ewelink email>',
|
|
password: '<your ewelink password>',
|
|
});
|
|
|
|
/* get all devices */
|
|
const devices = await conn.getDevices();
|
|
console.log(devices);
|
|
|
|
})();
|
|
```
|
|
|
|
Check `demo/example.js` for more examples. |