From 714ed7cc582f83c115d4b4a2fa4c86e71e7141e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marti=CC=81n=20M?= Date: Wed, 26 Jun 2019 23:27:52 -0300 Subject: [PATCH] added usage example on readme --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c9f079b..fbcbfe9 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,21 @@ ``` ## Usage -Check `demo/example.js` +``` +const ewelink = require('ewelink-api'); + +(async () => { + + const conn = new ewelink({ + email: '', + password: '', + }); + + /* get all devices */ + const devices = await conn.getDevices(); + console.log(devices); + +})(); +``` + +Check `demo/example.js` for more examples. \ No newline at end of file