homebridge-tauron-elicznik 0.0.2-beta55 → 0.0.2-beta56

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/index.js CHANGED
@@ -135,6 +135,7 @@ class eLicznikDevice {
135
135
  this.energyExport = 0;
136
136
 
137
137
  const options = {
138
+ method: 'POST',
138
139
  baseURL: LOGIN_URL,
139
140
  username: this.user,
140
141
  password: this.passwd,
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-beta55",
4
+ "version": "0.0.2-beta56",
5
5
  "description": "Homebridge plugin (https://github.com/homebridge/homebridge) to read data from Tauron eLicznik.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/tauronAuth.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  const axios = require('axios');
3
- const qs = require('qs');
4
3
 
5
4
  class axiosTauronAuth {
6
5
  constructor({
7
6
  options
8
7
  }) {
8
+ this.method = options.method;
9
9
  this.baseUrl = options.baseURL;
10
10
  this.username = options.username;
11
11
  this.password = options.password;
@@ -14,13 +14,13 @@ class axiosTauronAuth {
14
14
 
15
15
  async request() {
16
16
  try {
17
- const options = qs.stringify({
18
- method: 'POST',
17
+ const options = {
18
+ method: this.method,
19
19
  baseURL: this.baseUrl,
20
20
  username: this.username,
21
21
  password: this.password,
22
22
  service: this.service
23
- });
23
+ };
24
24
  const response = await axios(options);
25
25
  console.log(response)
26
26
  return response;