chronograph-npm 0.0.8 → 0.1.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/cg.d.ts +4 -2
- package/dist/cg.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cg.js +13 -2
package/dist/cg.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ export class CG {
|
|
|
3
3
|
homey: any;
|
|
4
4
|
}): Promise<CG>;
|
|
5
5
|
static detroy(): void;
|
|
6
|
+
static getAllChronographs(): Promise<any>;
|
|
7
|
+
static getChronographs(): Promise<any>;
|
|
6
8
|
/**
|
|
7
|
-
* @
|
|
9
|
+
* @description Setable member, when set, will be activated on any variable update.
|
|
8
10
|
* @param {Object} param0.variable
|
|
9
11
|
*/
|
|
10
|
-
static
|
|
12
|
+
static onChronographUpdate({ chronograph }: any): Promise<void>;
|
|
11
13
|
constructor({ homey }: {
|
|
12
14
|
homey: any;
|
|
13
15
|
});
|
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,sBAQC;IAgCD;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"cg.d.ts","sourceRoot":"","sources":["../src/cg.js"],"names":[],"mappings":"AAAA;IAGI;;oBAwBC;IA+BD,sBAQC;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
|
@@ -71,6 +71,7 @@ class CG {
|
|
|
71
71
|
if(!CG.isReady && CG._defer) CG._defer.resolve();
|
|
72
72
|
|
|
73
73
|
if (event === 'chronograph_event') {
|
|
74
|
+
if(data && data.now) data.now = new Date(data.now);
|
|
74
75
|
CG.onChronographUpdate({chronograph:data});
|
|
75
76
|
}
|
|
76
77
|
}
|
|
@@ -94,14 +95,24 @@ class CG {
|
|
|
94
95
|
return this.api;
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
|
|
99
|
+
static async getAllChronographs() {
|
|
100
|
+
if(CG && CG.Current && CG.Current.api) return await CG.Current.api.get('/allchronographs')
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static async getChronographs() {
|
|
104
|
+
if(CG && CG.Current && CG.Current.api) return await CG.Current.api.get('/chronographs')
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
97
108
|
|
|
98
109
|
|
|
99
110
|
/**
|
|
100
|
-
* @
|
|
111
|
+
* @description Setable member, when set, will be activated on any variable update.
|
|
101
112
|
* @param {Object} param0.variable
|
|
102
113
|
*/
|
|
103
114
|
static async onChronographUpdate({chronograph}) {
|
|
104
|
-
BL.homey.log('onChronographUpdate: ', chronograph);
|
|
115
|
+
//BL.homey.log('onChronographUpdate: ', chronograph);
|
|
105
116
|
|
|
106
117
|
}
|
|
107
118
|
|