@arekstasko/plantcare-api-client 1.1.9 → 1.2.0
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/dist/index.cjs +4 -7
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +4 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -552,16 +552,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
552
552
|
},
|
|
553
553
|
{
|
|
554
554
|
/**
|
|
555
|
-
* @param idQuery (optional)
|
|
556
555
|
* @return OK
|
|
557
556
|
*/ key: "batteryLevel",
|
|
558
|
-
value: function batteryLevel(
|
|
557
|
+
value: function batteryLevel(id, cancelToken) {
|
|
559
558
|
var _this = this;
|
|
560
|
-
var url_ = this.baseUrl + "/api/modules/{id}/battery-level
|
|
561
|
-
if (
|
|
562
|
-
url_ = url_.replace("{id}", encodeURIComponent("" +
|
|
563
|
-
if (idQuery === null) throw new globalThis.Error("The parameter 'idQuery' cannot be null.");
|
|
564
|
-
else if (idQuery !== void 0) url_ += "id=" + encodeURIComponent("" + idQuery) + "&";
|
|
559
|
+
var url_ = this.baseUrl + "/api/modules/{id}/battery-level";
|
|
560
|
+
if (id === void 0 || id === null) throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
561
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
565
562
|
url_ = url_.replace(/[?&]$/, "");
|
|
566
563
|
var options_ = {
|
|
567
564
|
method: "GET",
|
package/dist/index.d.cts
CHANGED
|
@@ -37,10 +37,9 @@ declare class Client {
|
|
|
37
37
|
modulesAll(cancelToken?: CancelToken): Promise<Module[]>;
|
|
38
38
|
protected processModulesAll(response: AxiosResponse): Promise<Module[]>;
|
|
39
39
|
/**
|
|
40
|
-
* @param idQuery (optional)
|
|
41
40
|
* @return OK
|
|
42
41
|
*/
|
|
43
|
-
batteryLevel(
|
|
42
|
+
batteryLevel(id: number, cancelToken?: CancelToken): Promise<number>;
|
|
44
43
|
protected processBatteryLevel(response: AxiosResponse): Promise<number>;
|
|
45
44
|
/**
|
|
46
45
|
* @return OK
|
package/dist/index.d.ts
CHANGED
|
@@ -37,10 +37,9 @@ declare class Client {
|
|
|
37
37
|
modulesAll(cancelToken?: CancelToken): Promise<Module[]>;
|
|
38
38
|
protected processModulesAll(response: AxiosResponse): Promise<Module[]>;
|
|
39
39
|
/**
|
|
40
|
-
* @param idQuery (optional)
|
|
41
40
|
* @return OK
|
|
42
41
|
*/
|
|
43
|
-
batteryLevel(
|
|
42
|
+
batteryLevel(id: number, cancelToken?: CancelToken): Promise<number>;
|
|
44
43
|
protected processBatteryLevel(response: AxiosResponse): Promise<number>;
|
|
45
44
|
/**
|
|
46
45
|
* @return OK
|
package/dist/index.js
CHANGED
|
@@ -444,16 +444,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
444
444
|
},
|
|
445
445
|
{
|
|
446
446
|
/**
|
|
447
|
-
* @param idQuery (optional)
|
|
448
447
|
* @return OK
|
|
449
448
|
*/ key: "batteryLevel",
|
|
450
|
-
value: function batteryLevel(
|
|
449
|
+
value: function batteryLevel(id, cancelToken) {
|
|
451
450
|
var _this = this;
|
|
452
|
-
var url_ = this.baseUrl + "/api/modules/{id}/battery-level
|
|
453
|
-
if (
|
|
454
|
-
url_ = url_.replace("{id}", encodeURIComponent("" +
|
|
455
|
-
if (idQuery === null) throw new globalThis.Error("The parameter 'idQuery' cannot be null.");
|
|
456
|
-
else if (idQuery !== void 0) url_ += "id=" + encodeURIComponent("" + idQuery) + "&";
|
|
451
|
+
var url_ = this.baseUrl + "/api/modules/{id}/battery-level";
|
|
452
|
+
if (id === void 0 || id === null) throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
453
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
457
454
|
url_ = url_.replace(/[?&]$/, "");
|
|
458
455
|
var options_ = {
|
|
459
456
|
method: "GET",
|