homebridge-tauron-elicznik 0.0.2-beta20 → 0.0.2-beta21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/tauroneLicznikAuth.js +23 -0
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"displayName": "Tauron eLicznik",
|
3
3
|
"name": "homebridge-tauron-elicznik",
|
4
|
-
"version": "0.0.2-
|
4
|
+
"version": "0.0.2-beta21",
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to read data from Tauron eLicznik.",
|
6
6
|
"license": "MIT",
|
7
7
|
"author": "grzegorz914",
|
@@ -19,6 +19,7 @@
|
|
19
19
|
},
|
20
20
|
"main": "index.js",
|
21
21
|
"files": [
|
22
|
+
"src",
|
22
23
|
"index.js",
|
23
24
|
"config.schema.json",
|
24
25
|
"package.json",
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
const https = require('https');
|
3
|
+
const axios = require('axios');
|
4
|
+
let count = 0;
|
5
|
+
|
6
|
+
class tauroneLicznikAuth {
|
7
|
+
constructor({
|
8
|
+
username,
|
9
|
+
password,
|
10
|
+
service
|
11
|
+
}) {
|
12
|
+
this.user = username;
|
13
|
+
this.passwd = password;
|
14
|
+
this.service = service;
|
15
|
+
}
|
16
|
+
|
17
|
+
async request(options) {
|
18
|
+
try {
|
19
|
+
return await axios.request(options);
|
20
|
+
} catch (err) {}
|
21
|
+
};
|
22
|
+
}
|
23
|
+
module.exports = tauroneLicznikAuth;
|