chronograph-npm 0.0.9 → 0.1.1
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/cg.d.ts +2 -1
- package/dist/cg.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cg.js +6 -2
package/dist/cg.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ export class CG {
|
|
|
2
2
|
static init({ homey }?: {
|
|
3
3
|
homey: any;
|
|
4
4
|
}): Promise<CG>;
|
|
5
|
-
static
|
|
5
|
+
static destroy(): void;
|
|
6
6
|
static getAllChronographs(): Promise<any>;
|
|
7
|
+
static getChronographs(): Promise<any>;
|
|
7
8
|
/**
|
|
8
9
|
* @description Setable member, when set, will be activated on any variable update.
|
|
9
10
|
* @param {Object} param0.variable
|
package/dist/cg.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../src/cg.js"],"names":[],"mappings":"AAAA;IAGI;;oBAwBC;IA+BD,
|
|
1
|
+
{"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../src/cg.js"],"names":[],"mappings":"AAAA;IAGI;;oBAwBC;IA+BD,uBAQC;IAgCD,0CAEC;IAED,uCAEC;IAKD;;;OAGG;IACH,gEAGC;IAxFD;;OAWC;IATG,WAA6B;IAC7B,iBAAoB;IAIpB,WAAyC;IAM7C,2BAaC;IAVW,SAAqC;IAyBjD,uDAOC;IAGD,eAAe;IACf,kBAeC;CAyBJ"}
|
package/package.json
CHANGED
package/src/cg.js
CHANGED
|
@@ -8,7 +8,7 @@ class CG {
|
|
|
8
8
|
homey.app.onUninit = async function (args) {
|
|
9
9
|
|
|
10
10
|
try {
|
|
11
|
-
if (CG) await CG.
|
|
11
|
+
if (CG) await CG.destroy();
|
|
12
12
|
} catch (error) {
|
|
13
13
|
console.log(error);
|
|
14
14
|
}
|
|
@@ -56,7 +56,7 @@ class CG {
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
static
|
|
59
|
+
static destroy() {
|
|
60
60
|
try {
|
|
61
61
|
if (!CG.Current) return;
|
|
62
62
|
if (CG.Current.api) {
|
|
@@ -100,6 +100,10 @@ class CG {
|
|
|
100
100
|
if(CG && CG.Current && CG.Current.api) return await CG.Current.api.get('/allchronographs')
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
static async getChronographs() {
|
|
104
|
+
if(CG && CG.Current && CG.Current.api) return await CG.Current.api.get('/chronographs')
|
|
105
|
+
}
|
|
106
|
+
|
|
103
107
|
|
|
104
108
|
|
|
105
109
|
|