mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-25 06:49:16 +01:00
added usage example on readme
This commit is contained in:
19
README.md
19
README.md
@@ -7,4 +7,21 @@
|
||||
```
|
||||
|
||||
## Usage
|
||||
Check `demo/example.js`
|
||||
```
|
||||
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.
|
||||
Reference in New Issue
Block a user